<div dir="ltr">Dear Sir,<br>I&#39;m trying to authenticate users based on their IP addresses and not based on username and password...I did the following in the config file:<br><br>1- I added loadmodule &quot;permissions.so&quot;<br>
2- modparam(&quot;permissions&quot;, &quot;db_url&quot;, &quot;mysql://opensips:123456@MySQL_Database_IP/Database_name&quot;)<br>3- I added the below function in route function<br><br>if (!allow_address(&quot;1&quot;, &quot;$si&quot;, &quot;$sp&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);<br>xlog(&quot;KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK&quot;);<br>};<br>4- on the database side I have created the address table then add an entry with the below values:<br>
<br>grp=1&nbsp;&nbsp; ip_address=My Softphone IP address&nbsp; mask=24&nbsp;&nbsp;&nbsp; Port=0<br><br>The problem is that I&#39;m getting Forbidden in case my IP exist in address table or not...<br>Does someone has any idea about what could be the issue here?<br>
<br>Thanks a lot for the help<br><br>Regards<br></div>