Hi,
I would rather suggest (instead of using the permissions module) to put
an extra field into the subscriber table and put the IP over there. You
can load that field during auth process via the "load_credentials"
parameter :
http://www.opensips.org/html/docs/modules/1.11.x/auth_db.html#id293578
After loading the field into an avp, after successful auth you can
simply do:
if ($si!=$avp(loaded_IP)) {
#reject call
}
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 27.07.2014 15:52, Лытаев Антон Викторович wrote:
For example: there are 50 subscribers with IP = telephone number and IP
Necessary to register the subscriber on 3 criteria: number + password + IP
here's what I found as an example:
loadmodule "permissions.so"
loadmodule "group.so"
if(!check_source_address("0")){
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
if (!idb_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
consume_credentials();
}
I have to link the "username" (from еable "Subscriber") and IP from
the table "address ".... This bundle comes group.so tools module and
table table "grp"?
and how to add (for example) of the user using opensipsctl
add ....?
Thanks!
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users