Dear Sir,
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:

1- I added loadmodule "permissions.so"
2- modparam("permissions", "db_url",
"mysql://opensips:123...@mysql_database_ip/Database_name")
3- I added the below function in route function

if (!allow_address("1", "$si", "$sp")) {
        sl_send_reply("403", "Forbidden");
xlog("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK");
};
4- on the database side I have created the address table then add an entry
with the below values:

grp=1   ip_address=My Softphone IP address  mask=24    Port=0

The problem is that I'm getting Forbidden in case my IP exist in address
table or not...
Does someone has any idea about what could be the issue here?

Thanks a lot for the help

Regards
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to