[SR-Users] Kamailio behind NAT, ACK to private IP not advertised public IP.

Pranathi Venkatayogi pvenkatayogi at cyracom.com
Thu Dec 29 03:08:38 CET 2016


I am attaching latest config along with kamailio log file and client trace.
Please let me know how I can get Kamailio to advertise public ip in record route.

I followed all the steps mentioned here - http://www.fredposner.com/1457/kamailio-behind-nat/

Thanks
Pranathi

From: Pranathi Venkatayogi
Sent: Wednesday, December 28, 2016 5:09 PM
To: 'sr-users at lists.sip-router.org' <sr-users at lists.sip-router.org>
Cc: Mick McGrellis <MMcGrellis at cyracom.com>; 'miconda at gmail.com' <miconda at gmail.com>
Subject: RE: Kamailio behind NAT, ACK to private IP not advertised public IP.

I implemented full NAT logic as per the sample config. Still unable to resolve the issue.
How do I let Kamailio change record_route header to use public ip address?

Please help!!!

(attached are latest scripts)

From: Pranathi Venkatayogi
Sent: Wednesday, December 28, 2016 12:39 PM
To: 'sr-users at lists.sip-router.org' <sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>>
Subject: Kamailio behind NAT, ACK to private IP not advertised public IP.

Hi,
  I am encountering the same problem described in google groups<https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>. However I dint not find any resolution hence writing again.

  200 OK sent from the server has private Ip in its record route. As you see below, though the message is received on public IP (63.149.103.72) , the record route is set to private IP (172.31.211.31)
  I used listen with advertise of public IP, it did not work. Please find attached the config I am using.

  How do I change it send public ip only when talking to external world.
  Can someone point to me clear documentation how to configure Kamailio for NAT traversal.

The following message is sent from Kamailio behind NAT to the public computer.
2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123, +0:08:42.690309
63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
SIP/2.0 200 OK
Via: SIP/2.0/TLS 10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e381a96979945bd969989ffe9dca3a9;alias
Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
Call-ID: eb8670eec4354acdb69fd26f5625b75c
From: "cust1" <sip:cust1 at translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish at translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
CSeq: 4665 INVITE
Server: Blink 3.0.0 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Contact: <sip:75329410 at 10.0.27.108:61381;transport=tls>
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length:   355
v=0
o=- 3691844303 3691844304 IN IP4 10.0.27.108
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.0.27.108
a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
--

The following is the ACK sent by public computer in reply to the above message. Note this message never reaches the Kamailio server as it is sent to private IP.
2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124, +0:08:42.690309
10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
ACK sip:75329410 at 10.0.27.108:61381;transport=tls SIP/2.0
Via: SIP/2.0/TLS 10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;alias
Max-Forwards: 70
From: "cust1" <sip:cust1 at translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: <sip:spanish at translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
Call-ID: eb8670eec4354acdb69fd26f5625b75c
CSeq: 4665 ACK
Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
User-Agent: Blink 3.0.0 (Windows)
Content-Length:  0

Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>

Join us:   [cid:image001.gif at 01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720>  [cid:image002.gif at 01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom>  [cid:image003.gif at 01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom>  [cid:image004.gif at 01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>

[cid:image005.png at 01D1C9C9.C4E8B6D0]

DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 405 bytes
Desc: image006.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 458 bytes
Desc: image007.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 607 bytes
Desc: image008.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 516 bytes
Desc: image009.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.png
Type: image/png
Size: 13716 bytes
Desc: image010.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailioLaptopTrace.log
Type: application/octet-stream
Size: 880655 bytes
Desc: kamailioLaptopTrace.log
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0003.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clientLaptopTrace.txt
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0001.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailioprod.cfg
Type: application/octet-stream
Size: 5980 bytes
Desc: kamailioprod.cfg
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: routing.cfg
Type: application/octet-stream
Size: 14373 bytes
Desc: routing.cfg
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161229/9fe7a376/attachment-0005.obj>


More information about the sr-users mailing list