<div dir="ltr">Dear Sir,<br>I'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 "permissions.so"<br>
2- modparam("permissions", "db_url", "mysql://opensips:123456@MySQL_Database_IP/Database_name")<br>3- I added the below function in route function<br><br>if (!allow_address("1", "$si", "$sp")) {<br>
sl_send_reply("403", "Forbidden");<br>xlog("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK");<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 ip_address=My Softphone IP address mask=24 Port=0<br><br>The problem is that I'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>