[asterisk-bugs] [JIRA] (ASTERISK-24687) Asterisk behind NAT sets wrong Contact Header
Lukas Hauser (JIRA)
noreply at issues.asterisk.org
Thu Jan 15 09:53:36 CST 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-24687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224498#comment-224498 ]
Lukas Hauser commented on ASTERISK-24687:
-----------------------------------------
Thanks for your response.
Here are the interesting outputs:
{code}
Retransmitting #6 (NAT) to My_Public_IP:2048:
SIP/2.0 200 OK
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-ztufmjdkgq36;received=My_Public_IP;rport=2048
From: "asterisk" <sip:799 at Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200 at Servers_Public_IP;user=phone>;tag=as48253780
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 2 INVITE
Server: PhoneServer
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:200 at Servers_Internal_IP:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 298
v=0
o=peter-marrat 841592342 841592342 IN IP4 Servers_Internal_IP
s=PhoneServer
c=IN IP4 Servers_Internal_IP
t=0 0
m=audio 18274 RTP/AVP 9 8 0 101
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
[Jan 15 16:40:55] WARNING[1056]: chan_sip.c:4047 retrans_pkt: Retransmission timeout reached on transmission 54b7df7fc133-3j2o6a6kz2ln for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
Really destroying SIP dialog '54b7df7fc133-3j2o6a6kz2ln' Method: INVITE
{code}
The 200 OK message gets no answer (and therefore get retransmitted), because the telephone tries to answer to the internal ip:
{code}
Sent to udp:Servers_Internal_IP:5060 at 15/1/2015 16:40:49:104 (384 bytes):
ACK sip:200 at Servers_Internal_IP:5060 SIP/2.0
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-33dx9xooo7m7;rport
From: "asterisk" <sip:799 at Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200 at Servers_Public_IP;user=phone>;tag=as48253780
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 2 ACK
Max-Forwards: 70
Contact: <sip:799 at My_Internal_IP:2048;line=ekyetc70>;reg-id=1
Content-Length: 0
{code}
> Asterisk behind NAT sets wrong Contact Header
> ---------------------------------------------
>
> Key: ASTERISK-24687
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24687
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/General
> Affects Versions: 13.1.0
> Environment: ubuntu 14.04.1
> Reporter: Lukas Hauser
> Assignee: Lukas Hauser
> Severity: Critical
>
> If asterisk is behind a statically configured NAT (e.g. with iptables), the externaddr or localnet option does not work.
> The Contact Header still contains the private IP address.
> The media_address option works.
> It also works as defined with version 11.7.0~dfsg-1ubuntu1.
> The Contact Header does not get updated in version 13.1 and 13.1.0-rc2.
> Therefore, I guess it is a bug in 13?
> Thanks!
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list