[SR-Users] Registrar - registered match_received

Ilie Soltanici iliusha.md at gmail.com
Mon Jul 27 17:26:32 CEST 2020


Hello,

Trying to check if an extension it's already registered with the same
received path.

if (registered("location","$fu",2)) {
  sl_send_reply("200","OK");
  exit;
};


But, it's not working for me, getting true even if the received path it's
different:

This is what I'm getting from Kamailio:

[root at dev ilie.soltanici]# /usr/local/sbin/kamcmd ul.dump
{
        Domains: {
                Domain: {
                        Domain: location
                        Size: 1024
                        AoRs: {
                                Info: {
                                        AoR: 101
                                        HashID: -1698832128
                                        Contacts: {
                                                Contact: {
                                                        Address:
sip:101 at 192.168.1.10:12767;ob
                                                        Expires: 2452
                                                        Q: 1.000000
                                                        Call-ID:
3fa6c9f7db404e8e93a9664c3634ddf7
                                                        CSeq: 31114
                                                        User-Agent:
MicroSIP/3.19.31
                                                        Received: sip:
192.168.1.10:12767
                                                        Path: [not set]
                                                        State: CS_SYNC
                                                        Flags: 0
                                                        CFlags: 12288
                                                        Socket: udp:
192.168.1.1:5060
                                                        Methods: 8159
                                                        Ruid:
uloc-b-5f1eea5d-57b0-1
                                                        Instance: [not set]
                                                        Reg-Id: 0
                                                        Server-Id: 11
                                                        Tcpconn-Id: -1
                                                        Keepalive: 1
                                                        Last-Keepalive:
1595862742
                                                        Last-Modified:
1595861637
                                                }
}

This is the SIP Trace:

2020/07/27 16:17:12.214151 192.168.1.10:12610 -> 192.168.1.1:5060
OPTIONS sip:dev.local SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK-91-1-0
From: "Test Account" <sip:101 at dev.local>;tag=91SIPpTag001
To: sip:dev.local
Call-ID: 1-91 at 192.168.1.10
User-Agent: SIPP
CSeq: 1 OPTIONS
Content-Length: 0

As you can see the source port it's different 12767/12610, but the
registered function is still getting true.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200727/e5593122/attachment.htm>


More information about the sr-users mailing list