<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 2.3 (Unix)">
        
        
        <style type="text/css">
        <!--
                @page { size: 8.5in 11in; margin: 0.79in }
                P { margin-bottom: 0.08in }
        -->
        </style>
<p style="margin-bottom: 0in;">Hello,</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">I am using opensips-1.5.1. And I m
doing IP-black listing.</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">I want to block calls from particular
IP(i.e 192.168.10). When I m doing that, the calls are not blocked,
its still working fine. Any suggestions on this ?? Below is my
opensips.cfg.</p>
<p style="margin-bottom: 0in;">----------------------------------------------------------------------------</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">loadmodule "userblacklist.so"<br>modparam("userblacklist",
"db_url","mysql://<a href="http://opensips:opensipsrw@127.0.0.1/opensips">opensips:opensipsrw@127.0.0.1/opensips</a>")<br>modparam("userblacklist",
"db_table", "userblacklist")<br>modparam("userblacklist",
"use_domain", 1) #non-zero value for domain support<br><br>
</p>
<p style="margin-bottom: 0in;">route[2]<br>{</p>
<p style="margin-bottom: 0in;"> $avp(i:80) = $rU;</p>
<p style="margin-bottom: 0in;"># $avp(i:80) =
$rU=~"192.168.1.10";</p>
<p style="margin-bottom: 0in;"># $avp(i:80) =
$rU=~"sip:1[0-9][0-9][0-9][1]@.*";</p>
<p style="margin-bottom: 0in;"># # rewrite the R-URI</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"> xlog("L_INFO","
Be4 check user blacklist, --------------------------------------\n");</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"> if
(!check_user_blacklist("$avp(i:80)", "$avp(i:82)"))</p>
<p style="margin-bottom: 0in;"> {</p>
<p style="margin-bottom: 0in;"> xlog("L_INFO","
inside check user blacklist,
--------------------------------------\n");</p>
<p style="margin-bottom: 0in;"> sl_send_reply("403",
"Forbidden");</p>
<p style="margin-bottom: 0in;"> exit;</p>
<p style="margin-bottom: 0in;"> }</p>
<p style="margin-bottom: 0in;">}</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">----------------------------------------------------------------------------<br>Table userblacklist entry</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"><b>ID        Username        Domain                prefix                whitelist</b></p>
<p style="margin-bottom: 0in;">1        10001                192.168.1.10                10001                0</p>
<p style="margin-bottom: 0in;">2        10002                192.168.1.10                10001                0</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">Thanks for your attention.</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">-Urmi</p>
<p style="margin-bottom: 0in;"><br>
</p>