<div>how about using permission module</div>
<div>ram</div>
<div><br><br> </div>
<div class="gmail_quote">On Fri, Sep 3, 2010 at 3:41 PM, vishu gaddi <span dir="ltr"><<a href="mailto:vishugaddi@gmail.com">vishugaddi@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><font size="4" face="monospace"><span style="LINE-HEIGHT: 16px; FONT-SIZE: 14px"><span style="LINE-HEIGHT: normal; BORDER-COLLAPSE: collapse; FONT-FAMILY: arial, sans-serif; FONT-SIZE: 13px">
<p style="MARGIN: 0px" class="MsoNormal">Hi,</p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal">I am using opensips-1.6.0. I am facing problem of authentication.</p>
<p style="MARGIN: 0px" class="MsoNormal">Opensips server is accepting calls from any IP even IP is registered in address table or not, and routing them to dialplan table and so on to destination gateway.</p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal">I want IP based authentication for incoming traffic and I am using check_source_address(“0”) function for this purpose of authentication, but is not working.</p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal">Here is script from opensips.cfg</p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal"><b>if (!(method=="REGISTER") && is_from_local()) </b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> {</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> if(!check_source_address("0")){</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> if (!proxy_authorize("", "subscriber")) {</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> proxy_challenge("", "0");</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> exit;</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> }</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> if (!db_check_from()) {</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> sl_send_reply("403","Forbidden auth ID");</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> exit;</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> }</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> </b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> consume_credentials();</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> # caller authenticated</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> }</b></p>
<p style="MARGIN: 0px" class="MsoNormal"><b> }</b></p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal">Please revert how to use this function to authenticate caller based on IP ??</p>
<p style="MARGIN: 0px" class="MsoNormal"> </p>
<p style="MARGIN: 0px" class="MsoNormal">Thanks,</p>
<p style="MARGIN: 0px" class="MsoNormal">Vishu</p></span></span></font><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br></blockquote></div><br>