<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Ali,<br>You have 2 groups in address table : <br><div><a rel="nofollow" target="_blank" href="http://192.168.1.5/32">192.168.1.5/32</a> - Group 1</div><div><a rel="nofollow" target="_blank" href="http://192.168.1.0/24">192.168.1.0/24</a> - Group 2</div><div>for example if you want to check the permission&nbsp; in your script, then use check the address as:<br>if (something) then<br>check_source_address(group1)<br></div>else<br>.......<br><br>The function *check_source_address* is exporeted from PERMISSION module.<br><br>//Binan<br>--- On <b>Sat, 8/25/12, Ali Pey <i>&lt;alipey@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Ali Pey &lt;alipey@gmail.com&gt;<br>Subject: Re: [OpenSIPS-Users] Overlapping address ranges permissions module<br>To: "OpenSIPS users mailling
 list" &lt;users@lists.opensips.org&gt;<br>Date: Saturday, August 25, 2012, 10:24 AM<br><br><div id="yiv1342550240">Hi Binan,<div><br></div><div>How is this related to&nbsp;<span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255,255,255);">overlapping address range?</span></div><div><font face="arial, sans-serif"><br>
</font><br><div class="yiv1342550240gmail_quote">On Sat, Aug 25, 2012 at 5:43 AM, Binan AL Halabi <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:binanalhalabi@yahoo.com" target="_blank" href="/mc/compose?to=binanalhalabi@yahoo.com">binanalhalabi@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="yiv1342550240gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top"><br>Indeed, the function check_address() takes the groupid as one of its arguments<br>In opensips script you can write a condition to use specific group in specific case.<br>
<br><a rel="nofollow" target="_blank" href="http://www.opensips.org/html/docs/modules/1.6.x/permissions.html#id293674">http://www.opensips.org/html/docs/modules/1.6.x/permissions.html#id293674</a> <br><br>//Binan.<br><h3>
                <code><br></code></h3><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;"><div><div class="yiv1342550240h5"><div><div><br><div>On Fri, Aug 24, 2012 at 10:43 AM, Ali Pey <span dir="ltr">&lt;<a rel="nofollow" target="_blank" href="http://mc/compose?to=alipey@gmail.com">alipey@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

The permissions module returns the first match, so depends on which group is first in your database, that will be selected. So basically you need to make sure there is no overlap.&nbsp;<div><br></div><div>Regards,</div><div>Ali Pey<br>



<div><br><div><div><div>On Fri, Aug 24, 2012 at 10:31 AM, Brett Nemeroff <span dir="ltr">&lt;<a rel="nofollow" target="_blank" href="http://mc/compose?to=brett@nemeroff.com">brett@nemeroff.com</a>&gt;</span> wrote:<br>

</div></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div>
Hello All,<div>I was wondering if anyone knew how gracefully overlapping address ranges works in the permissions module (using the address table).</div><div><br></div><div>An example of an overlapping address range would be something like:</div>





<div><a rel="nofollow" target="_blank"  href="http://192.168.1.5/32">192.168.1.5/32</a> - Group 1</div><div><a rel="nofollow" target="_blank"  href="http://192.168.1.0/24">192.168.1.0/24</a> - Group 2</div><div><br></div></div>
</div></blockquote></div>

</div></div></blockquote></div></div>
</div><br></div></div>-----Inline Attachment Follows-----<div class="yiv1342550240im"><br><br><div>_______________________________________________<br>Users mailing list<br><a rel="nofollow" target="_blank" href="http://mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></div></blockquote></td></tr></tbody></table><br>_______________________________________________<br>

Users mailing list<br>
<a rel="nofollow" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=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></div></blockquote></td></tr></table>