[SR-Users] Registrar - registered match_received
Sergiu Pojoga
pojogas at gmail.com
Mon Jul 27 17:42:29 CEST 2020
Did you specify to match on received?
For example:
$xavp(regcfg=>match_received) = $su;
if (registered("location", "$fu", 2, 1))
xlog("L_INFO", "S=$su is a valid Contact in Location \n");
On Mon, Jul 27, 2020 at 11:28 AM Ilie Soltanici <iliusha.md at gmail.com>
wrote:
> 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.
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200727/5ec154bb/attachment.htm>
More information about the sr-users
mailing list