You can do something like this:

avp_db_query("select ip from address where context_info='$fU'", "$avp(ip)");
if ($rc == -2) {
    # not found in db
} else if ($avp(ip) != $si) {
    # reject the call
}

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/13/2017 01:51 PM, maatohewetbi wrote:
Still I have to check login whether it exist in table. Then I have to compare
it to IP address.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-with-IP-authentication-selecting-variables-from-DB-tp7605514p7605554.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to