<div dir="ltr"><div>Hello,</div><div><br></div><div>Trying to check if an extension it's already registered with the same received path.</div><div><br></div><div>

<div style="color:rgb(171,178,191);background-color:rgb(40,44,52);font-family:"Fira Code",Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(198,120,221)">if</span><span style="color:rgb(171,178,191)"> (registered(</span><span style="color:rgb(152,195,121)">"location"</span><span style="color:rgb(171,178,191)">,</span><span style="color:rgb(152,195,121)">"$fu"</span><span style="color:rgb(171,178,191)">,</span><span style="color:rgb(209,154,102)">2</span><span style="color:rgb(171,178,191)"></span><span style="color:rgb(209,154,102)"></span><span style="color:rgb(171,178,191)">)) {</span></div><div><span style="color:rgb(171,178,191)">  sl_send_reply(</span><span style="color:rgb(152,195,121)">"200"</span><span style="color:rgb(171,178,191)">,</span><span style="color:rgb(152,195,121)">"OK"</span><span style="color:rgb(171,178,191)">);</span></div><div><span style="color:rgb(171,178,191)">  </span><span style="color:rgb(198,120,221)">exit</span><span style="color:rgb(171,178,191)">;</span></div><div><span style="color:rgb(171,178,191)">};</span></div></div>

</div><div><br></div><div><br></div><div>But, it's not working for me, getting true even if the received path it's different:</div><div><br></div><div>This is what I'm getting from Kamailio:<br></div><div><br></div><div>[root@dev ilie.soltanici]# /usr/local/sbin/kamcmd ul.dump<br>{<br>        Domains: {<br>                Domain: {<br>                        Domain: location<br>                        Size: 1024<br>                        AoRs: {<br>                                Info: {<br>                                        AoR: 101<br>                                        HashID: -1698832128<br>                                        Contacts: {<br>                                                Contact: {<br>                                                        Address: sip:101@192.168.1.10:12767;ob<br>                                                        Expires: 2452<br>                                                        Q: 1.000000<br>                                                        Call-ID: 3fa6c9f7db404e8e93a9664c3634ddf7<br>                                                        CSeq: 31114<br>                                                        User-Agent: MicroSIP/3.19.31<br>                                                        Received: sip:<a href="http://192.168.1.10:12767">192.168.1.10:12767</a><br>                                                        Path: [not set]<br>                                                        State: CS_SYNC<br>                                                        Flags: 0<br>                                                        CFlags: 12288<br>                                                        Socket: udp:<a href="http://192.168.1.1:5060">192.168.1.1:5060</a><br>                                                        Methods: 8159<br>                                                        Ruid: uloc-b-5f1eea5d-57b0-1<br>                                                        Instance: [not set]<br>                                                        Reg-Id: 0<br>                                                        Server-Id: 11<br>                                                        Tcpconn-Id: -1<br>                                                        Keepalive: 1<br>                                                        Last-Keepalive: 1595862742<br>                                                        Last-Modified: 1595861637<br>                                                }<br>}</div><div><br></div><div>This is the SIP Trace:</div><div><br></div><div>2020/07/27 16:17:12.214151 <a href="http://192.168.1.10:12610">192.168.1.10:12610</a> -> <a href="http://192.168.1.1:5060">192.168.1.1:5060</a><br>OPTIONS sip:dev.local SIP/2.0<br>Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK-91-1-0<br>From: "Test Account" <sip:101@dev.local>;tag=91SIPpTag001<br>To: sip:dev.local<br>Call-ID: <a href="mailto:1-91@192.168.1.10">1-91@192.168.1.10</a><br>User-Agent: SIPP<br>CSeq: 1 OPTIONS<br>Content-Length: 0</div><div><br></div><div>As you can see the source port it's different 
12767/12610, but the registered function is still getting true.</div><div><br></div><div>Thank you.<br></div></div>