Hi Michele,

I find no references in the docs on using "anonymous" as prefix - are you sure it should work ??

Anyhow, this module is a bit deprecated and poor performance - a simpler and more efficient way to implement blacklists (prefix based) is via dynamic routing module (use matching without routing feature).

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.10.2016 12:31, Michele Pinassi wrote:
Hi all,

i'm trying to block anonymous incoming calls using userblacklist module:

     if (!check_user_blacklist("$rU", "$rd", "$fU")) {
         xlog("L_ERR","403 - Forbidden - Call blocked from $fU to $rU\n");
             sl_send_reply("403", "Forbidden");
         exit;
         }

and in userblacklist MySQL table i add:

username: 5002 [my number]

domain: voip [my domain]

prefix: anonymous

but don't work as expected. Log say:

Oct  5 11:12:00 proxy-voip01 /usr/sbin/opensips[2980]: b153ab3e2c30d38e
- User net group is 1
[172.20.1.5/sip:[email protected]:5060/voip/sip:5002@voip:5060/172.20.1.5]
Oct  5 11:12:00 proxy-voip01 /usr/sbin/opensips[2980]: b153ab3e2c30d38e
- Destination for 5002 is voip
Oct  5 11:12:01 proxy-voip01 /usr/sbin/opensips[2980]: b153ab3e2c30d38e
- Route RELAY INVITE To: 5002, From: anonymous, RURI:
sip:[email protected]:37496
Oct  5 11:12:01 proxy-voip01 /usr/sbin/opensips[2980]: b153ab3e2c30d38e
- Route NEW BRANCH To: 5002, From: anonymous, RURI:
sip:[email protected]:37496

If i try to change "anonymous" with another number prefix, i.e. '333',
it works as expected:

Oct  5 11:11:08 proxy-voip01 /usr/sbin/opensips[2978]: d5d1d108325d3c69
- User net group is 1
[172.20.1.4/sip:[email protected]:5060/voip/sip:5002@voip:5060/172.20.1.4]
Oct  5 11:11:08 proxy-voip01 /usr/sbin/opensips[2978]: d5d1d108325d3c69
- Destination for 5002 is voip
Oct  5 11:11:08 proxy-voip01 /usr/sbin/opensips[2978]: 403 - Forbidden -
Call blocked from 333xxxxxx to 5002

Any suggestions ?

Thanks, Michele



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

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

Reply via email to