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

Fred Posner fred at palner.com
Thu Dec 29 17:23:22 CET 2016


> listen=udp:MY_IP_ADDR:5060 advertise MY_PUBLICIP_ADDR:5060

That statement does not exist anywhere in the files you sent.

--fred

On 12/29/2016 11:19 AM, Pranathi Venkatayogi wrote:
> Yes. I defined advertised address and even used listen with advertise as below. Still Kamailio does not send publicip in record route header.
> listen=udp:MY_IP_ADDR:5060 advertise MY_PUBLICIP_ADDR:5060
> 
> 
> -----Original Message-----
> From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel Grotti
> Sent: Thursday, December 29, 2016 6:31 AM
> To: sr-users at lists.sip-router.org
> Subject: Re: [SR-Users] Kamailio behind NAT, ACK to private IP not advertised public IP.
> 
> Hi,
> not sure if I understood it right but, have you defined the advertised_address ? That should be used in Via and RR as well:
> 
> https://www.kamailio.org/wiki/cookbooks/4.4.x/core#advertised_address
> 
> 
> Daniel
> 
> 
> On 12/29/2016 12:09 AM, Pranathi Venkatayogi wrote:
>> 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>
>> *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=z9hG4bKPj2e38
>> 1a96979945bd969989ffe9dca3a9;alias
>>
>> Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5
>> <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=2f25d2ae690747c48c874
>> e0b415ca03c
>>
>> To:
>> <sip:spanish at translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae
>> 8e060f30fe119
>>
>> 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=2f25d2ae690747c48c874
>> e0b415ca03c
>>
>> To:
>> <sip:spanish at translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae
>> 8e060f30fe119
>>
>> 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.
>>
>>
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> list sr-users at lists.sip-router.org 
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users at lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 



More information about the sr-users mailing list