<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><span>Thanks Fred, attached is the portion of the config file where I am doing the check. Also, can you let me know what you mean by "trying any number to your system"? Thank you.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent;">if (uri=~"sip:1[2-9][0-9]+@.*") {</div><div style="background-color: transparent;"> if (!is_user_in("From", "ld") && !is_user_in("To", "ld")) {</div><div style="background-color: transparent;">
<span style="color: rgb(0, 0, 191);">#Initally the above line was if (!is_user_in("From", "ld") )</span></div><div style="background-color: transparent;"> xlog("LOG: PSTN call but user don't have permissions\n");</div><div style="background-color: transparent;"> sl_send_reply("403", "No permission for long dist calls_here_is_the error");</div><div style="background-color: transparent;"> exit;</div><div
style="background-color: transparent;"> }</div><div style="background-color: transparent;"> }</div><div style="background-color: transparent;"> </div><div style="background-color: transparent;"> }</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"> # only local users allowed to call</div><div style="background-color: transparent;"># if((from_uri!=myself)) {</div><div style="background-color: transparent;"># sl_send_reply("403", "Not Allowed");</div><div style="background-color: transparent;"># exit;</div><div
style="background-color: transparent;"><span></span></div><div style="background-color: transparent;"> # }</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Regards,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Arun</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size:
16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Fred Posner <fred@palner.com><br> <b><span style="font-weight: bold;">To:</span></b> sr-users@lists.sip-router.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, February 10, 2014 3:08 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [SR-Users] Call forwarding from external did<br> </font> </div> <div class="y_msg_container"><br>On 02/10/2014 04:00 PM, arun Jayaprakash wrote:<div class="yqt6988918704" id="yqtfd12178"><br clear="none">> Hello, I have set
up call forwarding in Kamailio using user_preference<br clear="none">> table. When I make a call from a local extension the callfwd funcition<br clear="none">> works. The call gets forwarded to an external did number. The problem<br clear="none">> happens when and external call ( from a DID) comes to this extension the<br clear="none">> call does not get forwarded. I had to comment out the following lines in<br clear="none">> the config file to make it work:<br clear="none">><br clear="none">> # only local users allowed to call<br clear="none">> # if((from_uri!=myself)) {<br clear="none">> # sl_send_reply("403", "Not Allowed");<br clear="none">> # exit;<br clear="none">> # }<br clear="none">><br clear="none">> My question is if it is a risky think to comment out these lines? If so,<br clear="none">> what are my options.<br clear="none">><br clear="none">> Thank you,<br clear="none">>
Arun</div><br clear="none">><br clear="none"><br clear="none">In short, yes, it is risky-- but in honesty, noone can tell from just <br clear="none">that portion of the config.<br clear="none"><br clear="none">You can test this perhaps by trying any number to your system. Is it <br clear="none">also being forwarded?<br clear="none"><br clear="none">A good way is to add a flag and check for the presence of that flag if <br clear="none">allowing a non-registered user to make an outside call.<br clear="none"><br clear="none">Fred Posner, @qxork<br clear="none"><a shape="rect" href="http://palner.com/" target="_blank">http://palner.com</a><br clear="none"><br clear="none"><br clear="none">_______________________________________________<br clear="none">SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br clear="none"><a shape="rect" ymailto="mailto:sr-users@lists.sip-router.org"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br clear="none"><a shape="rect" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><div class="yqt6988918704" id="yqtfd26238"><br clear="none"></div><br><br></div> </div> </div> </div></body></html>