<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Michele,<br>
<br>
I find no references in the docs on using "anonymous" as prefix -
are you sure it should work ??<br>
<br>
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).<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 05.10.2016 12:31, Michele Pinassi
wrote:<br>
</div>
<blockquote cite="mid:54b958c1-0460-38eb-2fa0-7f1f2e77924a@unisi.it"
type="cite">
<pre wrap="">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
[<a class="moz-txt-link-abbreviated" href="mailto:172.20.1.5/sip:anonymous@172.20.1.5:5060/voip/sip:5002@voip:5060/172.20.1.5">172.20.1.5/sip:anonymous@172.20.1.5:5060/voip/sip:5002@voip:5060/172.20.1.5</a>]
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:
<a class="moz-txt-link-abbreviated" href="mailto:sip:5002@172.20.1.47:37496">sip:5002@172.20.1.47:37496</a>
Oct 5 11:12:01 proxy-voip01 /usr/sbin/opensips[2980]: b153ab3e2c30d38e
- Route NEW BRANCH To: 5002, From: anonymous, RURI:
<a class="moz-txt-link-abbreviated" href="mailto:sip:5002@172.20.1.47:37496">sip:5002@172.20.1.47:37496</a>
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
[<a class="moz-txt-link-abbreviated" href="mailto:172.20.1.4/sip:333xxxxxxx@172.20.1.4:5060/voip/sip:5002@voip:5060/172.20.1.4">172.20.1.4/sip:333xxxxxxx@172.20.1.4:5060/voip/sip:5002@voip:5060/172.20.1.4</a>]
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
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>