<div dir="auto"><div>Hi,<div dir="auto">The log message doesn't quite match your code sample. The code puts the subnet into the log, but your output does not have the /16 (in <font color="#f44336">red</font> below). Could you repeat and print all the avp's before and after is-in-subnet()?</div><div dir="auto"><br></div><div dir="auto">I can't remember if the subnet needs to have the lowest bits masked, but I will check and get back. (I.e. <a href="http://10.0.1.0/16">10.0.1.0/16</a>)</div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Hugh</div><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 Mar 2018 11:20 p.m.,  <<a href="mailto:volga629@networklab.ca">volga629@networklab.ca</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Everyone,<br>
Not sure what I am missing, but can't match ip address to subnet<br>
<br>
Log says<br>
<br>
 INFO: <script>: Subnets not match processing rtp...destination ip [<font color="#f44336">10.0.1.242</font>] and sourceip [10.0.1.241]<br>
<br>
<br>
       if(is_method("INVITE")) {<br>
               $avp(destip)=$(du{s.select,1,<wbr>:});<br>
               $avp(subnet) = $avp(destip) + "/16";<br>
               xlog("L_INFO", "Initial Request: [$rm] destination ip [$avp(destip)] and sourceip [$si]\n");<br>
               if(!is_in_subnet("$si", "$avp(subnet)")) {<br>
                       xlog("L_INFO", "Subnets not match processing rtp...destination ip [<font color="#f44336">$avp(subnet)</font>] and source ip [$si]\n");<br>
                       route(RTP_MANAGE);<br>
               }<br>
       }<br>
<br>
<br>
<br>
[root@prx00 ~]# rpm -qa | grep kamailio<br>
kamailio-mysql-5.1.2-2.git4c84<wbr>0b7e9.fc27.x86_64<br>
kamailio-5.1.2-2.git4c840b7e9.<wbr>fc27.x86_64<br>
<br>
<br>
Slava.<br>
<br>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br></div></div></div>