[sr-dev] [kamailio/kamailio] v5.0.4: nathelper: dont ping replicated aor's (#1299)

00Asgaroth00 notifications at github.com
Thu Nov 9 14:34:49 CET 2017


Hmm, just seen one happen now.
```
U 2017/11/09 13:25:56.263541 10.6.0.189:5060 -> 10.7.0.186:5062

OPTIONS sip:example_user at 78.143.152.30:59947 SIP/2.0.
Via: SIP/2.0/UDP 10.6.0.189:5060;branch=z9hG4bK5844925.
Route: <sip:10.7.0.186:5062;lr;received=sip:78.143.152.30:59947>.
From: sip:keepalive at example.com;tag=uloc-1-5a042966-4d55-1-6821c98a-af4da324.
To: sip:example_user at 78.143.152.30:59947.
Call-ID: 8ad70ab7-8e92721-ffcfa07 at 10.6.0.189.
CSeq: 1 OPTIONS.
Content-Length: 0.
.
```

What looks like happened here is that the server_id is set to 1, but the socket is not set, so nathelper is getting the default interface from the os and sending the ping on the wrong interface.

Here's the aor on registrar_1:
```
{
  "jsonrpc":  "2.0",
  "result": {
    "AoR":  "example_user at example.com",
    "Contacts": [{
        "Contact":  {
          "Address":  "sip:example_user at 78.143.152.30:59947",
          "Expires":  58,
          "Q":  -1,
          "Call-ID":  "1af6284f-59888f215eb1ff0e91850080f0808080 at KX-HDV430X",
          "CSeq": 1288,
          "User-Agent": "BF/IE/KX-HDV430X/06.001/BCC3422AAF2C",
          "Received": "sip:78.143.152.30:59947",
          "Path": "<sip:10.7.0.186:5062;lr;received=sip:78.143.152.30:59947>",
          "State":  "CS_NEW",
          "Flags":  2,
          "CFlags": 64,
          "Socket": "[not set]",
          "Methods":  8095,
          "Ruid": "uloc-1-5a042966-4d55-1",
          "Instance": "[not set]",
          "Reg-Id": 0,
          "Server-Id":  1,
          "Tcpconn-Id": -1,
          "Keepalive":  1,
          "Last-Keepalive": 1510233939,
          "Last-Modified":  1510233939
        }
      }]
  },
  "id": 20508
}
```

This contact is serviced by registrar_2 and it looks like it has its socket set to its local interface, but the server_id is still that of registrar_1 so registrar_1 is trying to ping it.

here's the aor on registrar_2 (this one "saved" the location, why is it's server_id still 1?).
```
{
  "jsonrpc":  "2.0",
  "result": {
    "AoR":  "example_user at example.com",
    "Contacts": [{
        "Contact":  {
          "Address":  "sip:example_user at 78.143.152.30:59947",
          "Expires":  68,
          "Q":  -1,
          "Call-ID":  "1af6284f-59888f215eb1ff0e91850080f0808080 at KX-HDV430X",
          "CSeq": 1290,
          "User-Agent": "BF/IE/KX-HDV430X/06.001/BCC3422AAF2C",
          "Received": "sip:78.143.152.30:59947",
          "Path": "<sip:10.7.0.186:5062;lr;received=sip:78.143.152.30:59947>",
          "State":  "CS_NEW",
          "Flags":  0,
          "CFlags": 64,
          "Socket": "udp:10.7.0.190:5060",
          "Methods":  8095,
          "Ruid": "uloc-1-5a042966-4d55-1",
          "Instance": "[not set]",
          "Reg-Id": 0,
          "Server-Id":  1,
          "Tcpconn-Id": -1,
          "Keepalive":  1,
          "Last-Keepalive": 1510234052,
          "Last-Modified":  1510234052
        }
      }]
  },
  "id": 20758
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1299#issuecomment-343155712
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20171109/93fa6772/attachment-0001.html>


More information about the sr-dev mailing list