<div dir="ltr">Dear Sir,<br><br>Kindly check the Whole configuration file:<br><br><a href="http://pastebin.com/d16fe5f36" target="_blank">http://pastebin.com/d16fe5f36</a><br><br>Please
let me know if there is something wrong...I'm not be able to make a
call and when dialing 00 from a registered or non registered endpoint
OpenSIPS run inside the function if(!allow_address("1", "$si", "$sp")){<br>
<br><br>Regards<br><br><div class="gmail_quote">On Thu, Jan 15, 2009 at 11:22 AM, michel freiha <span dir="ltr"><<a href="mailto:michofr@gmail.com">michofr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Dear Bogdan,<br><br>I tried allow_address() and it returns an error when restarting OpenSIPS..Even I tried to change the mask field type from tinit to varchar but if I put a value inside it like 26 and restart OpenSIPS I even get an error<br>
<br>Regards<br><br>Regards<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Michel,<br>
<br>
Have you tried to use the simple format of the command ?<br>
<br>
Like allow_address() ?<br>
<br>
Also not that after filling in the table, you have either to restart, either to issue the "address_reload" MI command.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
michel freiha wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
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></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">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>
<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>