[Home]

Summary:ASTERISK-24687: Asterisk behind NAT sets wrong Contact Header
Reporter:Lukas Hauser (luka5)Labels:
Date Opened:2015-01-14 11:24:22.000-0600Date Closed:2015-02-16 11:39:57.000-0600
Priority:CriticalRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:13.1.0 Frequency of
Occurrence
Related
Issues:
Environment:ubuntu 14.04.1Attachments:( 0) debug.log
( 1) debug-asterisk11.15.log
( 2) deubg-asterisk11.log
( 3) sip-settings.log
Description: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!
Comments:By: Michael L. Young (elguero) 2015-01-14 15:55:39.773-0600

We require a complete debug log to help triage the issue. This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Please also include your SIP settings by running 'sip show settings' at the cli.

Any relevant peer settings as well, 'sip show peer <peername>'.

Thanks

By: Lukas Hauser (luka5) 2015-01-15 09:52:07.950-0600

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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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@Servers_Internal_IP:5060 SIP/2.0
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-33dx9xooo7m7;rport
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>;tag=as48253780
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 2 ACK
Max-Forwards: 70
Contact: <sip:799@My_Internal_IP:2048;line=ekyetc70>;reg-id=1
Content-Length: 0
{code}

By: Lukas Hauser (luka5) 2015-01-15 09:54:51.519-0600

Here the arguable rather uninteresting settings and outputs.

This is my setting of the peer:
{code}
asterisk*CLI> sip show peer 799


 * Name       : 799
 Description  :
 Secret       : <Set>
 MD5Secret    : <Not set>
 Remote Secret: <Not set>
 Context      : localsets-common
 Record On feature : automon
 Record Off feature : automon
 Subscr.Cont. : <Not set>
 Language     :
 Tonezone     : <Not set>
 AMA flags    : Unknown
 Transfer mode: open
 CallingPres  : Presentation Allowed, Not Screened
 Callgroup    :
 Pickupgroup  :
 Named Callgr :
 Nam. Pickupgr:
 MOH Suggest  :
 Mailbox      :
 VM Extension : asterisk
 LastMsgsSent : 0/0
 Call limit   : 0
 Max forwards : 0
 Dynamic      : Yes
 Callerid     : "" <>
 MaxCallBR    : 384 kbps
 Expire       : 3387
 Insecure     : no
 Force rport  : Yes
 Symmetric RTP: Yes
 ACL          : No
 DirectMedACL : No
 T.38 support : No
 T.38 EC mode : Unknown
 T.38 MaxDtgrm: 4294967295
 DirectMedia  : No
 PromiscRedir : No
 User=Phone   : No
 Video Support: No
 Text Support : No
 Ign SDP ver  : No
 Trust RPID   : No
 Send RPID    : No
 Path support : No
 Path         : N/A
 TrustIDOutbnd: Legacy
 Subscriptions: Yes
 Overlap dial : No
 DTMFmode     : auto
 Timer T1     : 500
 Timer B      : 32000
 ToHost       :
 Addr->IP     : MY_PUBLIC_IP:2048
 Defaddr->IP  : (null)
 Prim.Transp. : UDP
 Allowed.Trsp : UDP
 Def. Username: 799
 SIP Options  : 100rel from-change replaces replace timer
 Codecs       : (g722|alaw|ulaw)
 Auto-Framing : No
 Status       : OK (53 ms)
 Useragent    : snom300/8.7.3.25.5
 Reg. Contact : sip:799@MY_INTERNAL_IP:2048;line=ekyetc70
 Qualify Freq : 60000 ms
 Keepalive    : 0 ms
 Sess-Timers  : Accept
 Sess-Refresh : uas
 Sess-Expires : 1800 secs
 Min-Sess     : 90 secs
 RTP Engine   : asterisk
 Parkinglot   :
 Use Reason   : No
 Encryption   : No
{code}


This is the full output in rasterisk with sip debug and verbose/debug 5:
{code}
asterisk*CLI>

<--- SIP read from UDP:My_Public_IP:2048 --->
INVITE sip:200@Servers_Public_IP;user=phone SIP/2.0
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-7urjyzzcy8uk;rport
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 1 INVITE
Max-Forwards: 70
Contact: <sip:799@My_Internal_IP:2048;line=ekyetc70>;reg-id=1
X-Serialnumber: 0004133BD3D8
P-Key-Flags: keys="3"
User-Agent: snom300/8.7.3.25.5
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Content-Type: application/sdp
Content-Length: 487

v=0
o=root 1423334005 1423334005 IN IP4 My_Internal_IP
s=call
c=IN IP4 My_Internal_IP
t=0 0
m=audio 63440 RTP/AVP 9 0 8 3 99 108 18 101
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:8hG6KenMGHoQudyXSAfEpNZDGfXGSEWEIoRRpSLu
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:99 G726-32/8000
a=rtpmap:108 AAL2-G726-32/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
<------------->
--- (19 headers 19 lines) ---
Sending to My_Public_IP:2048 (NAT)
Sending to My_Public_IP:2048 (NAT)
Using INVITE request as basis request - 54b7df7fc133-3j2o6a6kz2ln
Found peer '799' for '799' from My_Public_IP:2048

<--- Reliably Transmitting (NAT) to My_Public_IP:2048 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-7urjyzzcy8uk;received=My_Public_IP;rport=2048
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>;tag=as715f8224
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 1 INVITE
Server: PhoneServer
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="100a8bed"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '54b7df7fc133-3j2o6a6kz2ln' in 6400 ms (Method: INVITE)
Retransmitting #1 (NAT) to My_Public_IP:2048:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-7urjyzzcy8uk;received=My_Public_IP;rport=2048
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>;tag=as715f8224
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 1 INVITE
Server: PhoneServer
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="100a8bed"
Content-Length: 0


---

<--- SIP read from UDP:My_Public_IP:2048 --->
ACK sip:200@Servers_Public_IP;user=phone SIP/2.0
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-7urjyzzcy8uk;rport
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>;tag=as715f8224
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 1 ACK
Max-Forwards: 70
Contact: <sip:799@My_Internal_IP:2048;line=ekyetc70>;reg-id=1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---

<--- SIP read from UDP:My_Public_IP:2048 --->
INVITE sip:200@Servers_Public_IP;user=phone SIP/2.0
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-ztufmjdkgq36;rport
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 2 INVITE
Max-Forwards: 70
Contact: <sip:799@My_Internal_IP:2048;line=ekyetc70>;reg-id=1
X-Serialnumber: 0004133BD3D8
P-Key-Flags: keys="3"
User-Agent: snom300/8.7.3.25.5
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Authorization: Digest username="799",realm="asterisk",nonce="100a8bed",uri="sip:200@Servers_Public_IP;user=phone",response="bafcc7afbc111650b1f0599622f8d421",algorithm=MD5
Content-Type: application/sdp
Content-Length: 487

v=0
o=root 1423334005 1423334005 IN IP4 My_Internal_IP
s=call
c=IN IP4 My_Internal_IP
t=0 0
m=audio 63440 RTP/AVP 9 0 8 3 99 108 18 101
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:8hG6KenMGHoQudyXSAfEpNZDGfXGSEWEIoRRpSLu
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:99 G726-32/8000
a=rtpmap:108 AAL2-G726-32/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
<------------->
--- (20 headers 19 lines) ---
Sending to My_Public_IP:2048 (NAT)
Using INVITE request as basis request - 54b7df7fc133-3j2o6a6kz2ln
Found peer '799' for '799' from My_Public_IP:2048
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 99
Found RTP audio format 108
Found RTP audio format 18
Found RTP audio format 101
Found audio description format G722 for ID 9
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format GSM for ID 3
Found audio description format G726-32 for ID 99
Found audio description format AAL2-G726-32 for ID 108
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - (g722|alaw|ulaw), peer - audio=(ulaw|gsm|alaw|g722|g729|g726|g726aal2)/video=(nothing)/text=(nothing), combined - (g722|alaw|ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port My_Internal_IP:63440
Looking for 200 in localsets-common (domain Servers_Public_IP)
sip_route_dump: route/path hop: <sip:799@My_Internal_IP:2048;line=ekyetc70>

<--- Transmitting (NAT) to My_Public_IP:2048 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-ztufmjdkgq36;received=My_Public_IP;rport=2048
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>
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@Servers_Internal_IP:5060>
Content-Length: 0


<------------>

<--- SIP read from UDP:My_Public_IP:2048 --->
ACK sip:200@Servers_Public_IP;user=phone SIP/2.0
Via: SIP/2.0/UDP My_Internal_IP:2048;branch=z9hG4bK-7urjyzzcy8uk;rport
From: "asterisk" <sip:799@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@Servers_Public_IP;user=phone>;tag=as715f8224
Call-ID: 54b7df7fc133-3j2o6a6kz2ln
CSeq: 1 ACK
Max-Forwards: 70
Contact: <sip:799@My_Internal_IP:2048;line=ekyetc70>;reg-id=1
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Audio is at 18274
Adding codec g722 to SDP
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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

<------------>
Retransmitting #1 (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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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

---
Retransmitting #2 (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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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

---
Retransmitting #3 (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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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

---
Retransmitting #4 (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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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

---
Scheduling destruction of SIP dialog '54b7df7fc133-3j2o6a6kz2ln' in 6400 ms (Method: INVITE)
Retransmitting #5 (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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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

---
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@Servers_Public_IP>;tag=xg3y10jayj
To: <sip:200@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@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}

By: Lukas Hauser (luka5) 2015-01-20 04:24:18.553-0600

Any news on that?
Can you reproduce the bug with these information?
Do you need more detailed help on this?

By: Michael L. Young (elguero) 2015-01-20 13:26:01.519-0600

@Lukas The debug that you put in the comment section only contains sip debug.  Can you gather a full debug log and attach it to this issue?  Also, can you provide the 'sip show settings' from the cli?

Please follow the instructions on this page for collecting the debug information:
https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Thanks

By: Lukas Hauser (luka5) 2015-01-21 04:34:02.258-0600

This is the entire message file.
I started asterisk, logged the phone in with SIP/799 and called 100.

{code}
[Jan 21 11:25:49] Asterisk 13.1.0 built by root @ asterisk on a x86_64 running Linux on 2015-01-09 18:57:29 UTC
[Jan 21 11:25:49] NOTICE[1331] cdr.c: CDR simple logging enabled.
[Jan 21 11:25:49] NOTICE[1331] loader.c: 225 modules will be loaded.
[Jan 21 11:25:49] WARNING[1331] res_phoneprov.c: Unable to find a valid server address or name.
[Jan 21 11:25:50] ERROR[1331] ari/config.c: No configured users for ARI
[Jan 21 11:25:50] WARNING[1331] loader.c: Error loading module 'res_ari_mailboxes.so': /usr/lib/asterisk/modules/res_ari_mailboxes.so: undefined symbol: stasis_app_mailbox_to_json
[Jan 21 11:25:50] WARNING[1331] loader.c: Module 'res_ari_mailboxes.so' could not be loaded.
[Jan 21 11:25:50] NOTICE[1331] chan_skinny.c: Configuring skinny from skinny.conf
[Jan 21 11:25:50] NOTICE[1331] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[Jan 21 11:25:50] NOTICE[1331] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Jan 21 11:26:34] NOTICE[1374] chan_sip.c: Peer '799' is now Reachable. (53ms / 2000ms)
[Jan 21 11:26:49] WARNING[1374] chan_sip.c: Retransmission timeout reached on transmission 54bf7ee1a135-rwnecbqx2srq for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
{code}

This is the simple extension.conf entry
{code}
exten => 100,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
{code}


By: Lukas Hauser (luka5) 2015-01-21 04:38:05.901-0600

The output of `sip show settings` is attached above.
The servers internal IP is 192.168.122.120, therefore the localnet should contain this ip.

By: Michael L. Young (elguero) 2015-01-21 10:19:13.410-0600

Lukas,

I am still not seeing the debug messages.  Are you following the documentation for turning those debug messages on?

Also, I need to see the phone register to the server?  Based on {{sip show peer 799}}, Asterisk thinks that it should be sending to {{Reg. Contact : sip:799@MY_INTERNAL_IP:2048;line=ekyetc70}}.

Please capture the debug messages that have the phone registering to your Asterisk machine and then making a call.

By: Lukas Hauser (luka5) 2015-01-26 03:39:33.218-0600

Here the full debug log.
Sorry about being imprecise.

I changed to Phones registrar from ip address to hostname.
Also, I replaced the Public IPs of the server, the phone and the host name with something like #...#



By: Lukas Hauser (luka5) 2015-01-26 03:55:59.410-0600

I now tried the same process again with asterisk 11.7.0~dfsg-1ubuntu1.
It works fine, I also attach some debug messages:
As we can see the Reg. Contact Header is exactly the same.

{code}
  asterisk11*CLI> sip show peer 799
 * Name       : 799
 Description  :
 Secret       : <Set>
 MD5Secret    : <Not set>
 Remote Secret: <Not set>
 Context      : localsets-common
 Record On feature : automon
 Record Off feature : automon
 Subscr.Cont. : <Not set>
 Language     :
 Tonezone     : <Not set>
 AMA flags    : Unknown
 Transfer mode: open
 CallingPres  : Presentation Allowed, Not Screened
 Callgroup    :
 Pickupgroup  :
 Named Callgr :
 Nam. Pickupgr:
 MOH Suggest  :
 Mailbox      :
 VM Extension : asterisk
 LastMsgsSent : 32767/65535
 Call limit   : 0
 Max forwards : 0
 Dynamic      : Yes
 Callerid     : "" <>
 MaxCallBR    : 384 kbps
 Expire       : 3545
 Insecure     : no
 Force rport  : Yes
 Symmetric RTP: Yes
 ACL          : No
 DirectMedACL : No
 T.38 support : Yes
 T.38 EC mode : FEC
 T.38 MaxDtgrm: 400
 DirectMedia  : No
 PromiscRedir : No
 User=Phone   : No
 Video Support: No
 Text Support : No
 Ign SDP ver  : No
 Trust RPID   : No
 Send RPID    : No
 Subscriptions: Yes
 Overlap dial : No
 DTMFmode     : auto
 Timer T1     : 500
 Timer B      : 32000
 ToHost       :
 Addr->IP     : PhonesPublicIP:2048
 Defaddr->IP  : (null)
 Prim.Transp. : UDP
 Allowed.Trsp : UDP
 Def. Username: 799
 SIP Options  : 100rel from-change replaces replace timer
 Codecs       : (ulaw|alaw|g722)
 Codec Order  : (g722:20,alaw:20,ulaw:20)
 Auto-Framing :  No
 Status       : OK (53 ms)
 Useragent    : snom300/8.7.3.25.5
 Reg. Contact : sip:799@192.168.1.41:2048;line=5jw4uomf
 Qualify Freq : 60000 ms
 Keepalive    : 0 ms
 Sess-Timers  : Accept
 Sess-Refresh : uas
 Sess-Expires : 1800 secs
 Min-Sess     : 90 secs
 RTP Engine   : asterisk
 Parkinglot   :
 Use Reason   : No
 Encryption   : No
{code}

By: Michael L. Young (elguero) 2015-01-26 15:31:57.835-0600

Lukas,

In an earlier comment, you mentioned that the server's LAN address is 192.168.122.120.

In the debug logs you posted today, I am seeing that the 13.1 server has a LAN address of 192.168.122.99.

The 11.7 server has a LAN address of 192.168.122.104.

Can you please post the _sip settings_ for both servers?  Can we verify that the {{externaddr}} and {{localaddr}} settings for both servers are the same?

The reason why is that I am looking at the code and not seeing anything out of the ordinary yet.  But, I do see this in the logs.

*11.7*
{noformat}
[Jan 26 10:50:55] DEBUG[1167] acl.c: For destination '#PhonesPublicIP#', our source address is '192.168.122.104'.
[Jan 26 10:50:55] DEBUG[1167] chan_sip.c: Target address #PhonesPublicIP#:2048 is not local, substituting externaddr
[Jan 26 10:50:55] DEBUG[1167] chan_sip.c: Setting SIP_TRANSPORT_UDP with address #ServersPublicIP#:5060
{noformat}

*13.1*
{noformat}
[Jan 26 10:28:02] DEBUG[1380] acl.c: For destination '#PhonesPublicIP#', our source address is '192.168.122.99'.
[Jan 26 10:28:02] DEBUG[1380] chan_sip.c: Setting AST_TRANSPORT_UDP with address 192.168.122.99:5060
{noformat}

The function that determines if the address is local or external appears to be identical in both versions of Asterisk.  So, it would be good to get confirmation that since we appear to be working with two different machines here with these logs, that the settings are indeed identical on both machines.

Thank you

By: Lukas Hauser (luka5) 2015-01-27 10:07:46.112-0600

Michael,

the server's LAN address of the asterisk 11.7 machine is 192.168.122.104 and the one of the asterisk 13.1 is 192.168.122.99.
They are both virtual machines using KVM and NAT with an own public IP for each server.

*sip settings asterisk 11.7*
{code}
asterisk11*CLI> sip show settings


Global Settings:
----------------
 UDP Bindaddress:        0.0.0.0:5060
 TCP SIP Bindaddress:    Disabled
 TLS SIP Bindaddress:    Disabled
 Videosupport:           No
 Textsupport:            No
 Ignore SDP sess. ver.:  No
 AutoCreate Peer:        Off
 Match Auth Username:    No
 Allow unknown access:   No
 Allow subscriptions:    Yes
 Allow overlap dialing:  No
 Allow promisc. redir:   No
 Enable call counters:   No
 SIP domain support:     No
 Realm. auth:            No
 Our auth realm          #Hostname#
 Use domains as realms:  No
 Call to non-local dom.: Yes
 URI user is phone no:   No
 Always auth rejects:    Yes
 Direct RTP setup:       No
 User Agent:             Telephone Server
 SDP Session Name:       Telephone Server
 SDP Owner Name:         peter-marrat
 Reg. context:           (not set)
 Regexten on Qualify:    No
 Trust RPID:             No
 Send RPID:              No
 Legacy userfield parse: No
 Send Diversion:         Yes
 Caller ID:              asterisk
 From: Domain:          
 Record SIP history:     Off
 Call Events:            Off
 Auth. Failure Events:   Off
 T.38 support:           Yes
 T.38 EC mode:           FEC
 T.38 MaxDtgrm:          400
 SIP realtime:           Disabled
 Qualify Freq :          60000 ms
 Q.850 Reason header:    No
 Store SIP_CAUSE:        No

Network QoS Settings:
---------------------------
 IP ToS SIP:             CS0
 IP ToS RTP audio:       CS0
 IP ToS RTP video:       CS0
 IP ToS RTP text:        CS0
 802.1p CoS SIP:         4
 802.1p CoS RTP audio:   5
 802.1p CoS RTP video:   6
 802.1p CoS RTP text:    5
 Jitterbuffer enabled:   No

Network Settings:
---------------------------
 SIP address remapping:  Enabled using externaddr
 Externhost:             <none>
 Externaddr:             #ServersPublicIP#:5060
 Externrefresh:          10
 Localnet:               192.168.122.0/255.255.255.255

Global Signalling Settings:
---------------------------
 Codecs:                 (gsm|ulaw|alaw|h263|testlaw)
 Codec Order:            none
 Relax DTMF:             No
 RFC2833 Compensation:   No
 Symmetric RTP:          Yes
 Compact SIP headers:    No
 RTP Keepalive:          0 (Disabled)
 RTP Timeout:            0 (Disabled)
 RTP Hold Timeout:       0 (Disabled)
 MWI NOTIFY mime type:   application/simple-message-summary
 DNS SRV lookup:         Yes
 Pedantic SIP support:   Yes
 Reg. min duration       60 secs
 Reg. max duration:      3600 secs
 Reg. default duration:  120 secs
 Sub. min duration       60 secs
 Sub. max duration:      3600 secs
 Outbound reg. timeout:  20 secs
 Outbound reg. attempts: 0
 Outbound reg. retry 403:0
 Notify ringing state:   Yes
   Include CID:          No
 Notify hold state:      No
 SIP Transfer mode:      open
 Max Call Bitrate:       384 kbps
 Auto-Framing:           No
 Outb. proxy:            <not set>
 Session Timers:         Accept
 Session Refresher:      uas
 Session Expires:        1800 secs
 Session Min-SE:         90 secs
 Timer T1:               500
 Timer T1 minimum:       100
 Timer B:                32000
 No premature media:     Yes
 Max forwards:           70

Default Settings:
-----------------
 Allowed transports:     UDP
 Outbound transport:     UDP
 Context:                public
 Record on feature:      automon
 Record off feature:     automon
 Force rport:            Yes
 DTMF:                   rfc2833
 Qualify:                0
 Keepalive:              0
 Use ClientCode:         No
 Progress inband:        Never
 Language:              
 Tone zone:              <Not set>
 MOH Interpret:          default
 MOH Suggest:            
 Voice Mail Extension:   asterisk

----
asterisk11*CLI>
{code}

*sip settings asterisk 13.1*
{code}
asterisk*CLI> sip show settings


Global Settings:
----------------
 UDP Bindaddress:        [::]:5060
 ** Additional Info:
    [::] may include IPv4 in addition to IPv6, if such a feature is enabled in the OS.
 TCP SIP Bindaddress:    0.0.0.0:5060
 TLS SIP Bindaddress:    Disabled
 Videosupport:           No
 Textsupport:            No
 Ignore SDP sess. ver.:  No
 AutoCreate Peer:        Off
 Match Auth Username:    No
 Allow unknown access:   No
 Allow subscriptions:    Yes
 Allow overlap dialing:  No
 Allow promisc. redir:   No
 Enable call counters:   No
 SIP domain support:     No
 Path support :          No
 Realm. auth:            No
 Our auth realm          asterisk
 Use domains as realms:  No
 Call to non-local dom.: Yes
 URI user is phone no:   No
 Always auth rejects:    Yes
 Direct RTP setup:       No
 User Agent:             Telephone Server
 SDP Session Name:       Telephone Server
 SDP Owner Name:         peter-marrat
 Reg. context:           (not set)
 Regexten on Qualify:    No
 Trust RPID:             No
 Send RPID:              No
 Legacy userfield parse: No
 Send Diversion:         Yes
 Caller ID:              asterisk
 From: Domain:          
 Record SIP history:     Off
 Auth. Failure Events:   Off
 T.38 support:           No
 T.38 EC mode:           Unknown
 T.38 MaxDtgrm:          4294967295
 SIP realtime:           Disabled
 Qualify Freq :          60000 ms
 Q.850 Reason header:    No
 Store SIP_CAUSE:        No

Network QoS Settings:
---------------------------
 IP ToS SIP:             CS0
 IP ToS RTP audio:       CS0
 IP ToS RTP video:       CS0
 IP ToS RTP text:        CS0
 802.1p CoS SIP:         4
 802.1p CoS RTP audio:   5
 802.1p CoS RTP video:   6
 802.1p CoS RTP text:    5
 Jitterbuffer enabled:   No

Network Settings:
---------------------------
 SIP address remapping:  Enabled using externaddr
 Externhost:             <none>
 Externaddr:             #ServersPublicIP#:5060
 Externrefresh:          10
 Localnet:               192.168.122.0/255.255.255.255

Global Signalling Settings:
---------------------------
 Codecs:                 (ulaw|alaw|gsm|h263)
 Relax DTMF:             No
 RFC2833 Compensation:   No
 Symmetric RTP:          Yes
 Compact SIP headers:    No
 RTP Keepalive:          0 (Disabled)
 RTP Timeout:            0 (Disabled)
 RTP Hold Timeout:       0 (Disabled)
 MWI NOTIFY mime type:   application/simple-message-summary
 DNS SRV lookup:         No
 Pedantic SIP support:   Yes
 Reg. min duration       60 secs
 Reg. max duration:      3600 secs
 Reg. default duration:  120 secs
 Sub. min duration       60 secs
 Sub. max duration:      3600 secs
 Outbound reg. timeout:  20 secs
 Outbound reg. attempts: 0
 Outbound reg. retry 403:0
 Notify ringing state:   Yes
   Include CID:          No
 Notify hold state:      No
 SIP Transfer mode:      open
 Max Call Bitrate:       384 kbps
 Auto-Framing:           No
 Outb. proxy:            <not set>
 Session Timers:         Accept
 Session Refresher:      uas
 Session Expires:        1800 secs
 Session Min-SE:         90 secs
 Timer T1:               500
 Timer T1 minimum:       100
 Timer B:                32000
 No premature media:     Yes
 Max forwards:           70

Default Settings:
-----------------
 Allowed transports:     UDP
 Outbound transport:     UDP
 Context:                unauthenticated
 Record on feature:      automon
 Record off feature:     automon
 Force rport:            Yes
 DTMF:                   rfc2833
 Qualify:                0
 Keepalive:              0
 Use ClientCode:         No
 Progress inband:        Never
 Language:              
 Tone zone:              <Not set>
 MOH Interpret:          default
 MOH Suggest:            
 Voice Mail Extension:   asterisk

----
asterisk*CLI>
{code}

I've also tried it with the `realm` setting in 13.1, but there is no difference.
So far, I've not tried it with the latest version 11.

By: Lukas Hauser (luka5) 2015-01-27 11:28:51.913-0600

I've now tried it even with the *asterisk 11.15.0* version (LAN address 192.168.122.122).
*Same issue here!!*

{code}
sterisk11-latest*CLI> sip show settings


Global Settings:
----------------
 UDP Bindaddress:        [::]:5060
 ** Additional Info:
    [::] may include IPv4 in addition to IPv6, if such a feature is enabled in the OS.
 TCP SIP Bindaddress:    [::]:5060
 TLS SIP Bindaddress:    Disabled
 Videosupport:           No
 Textsupport:            No
 Ignore SDP sess. ver.:  No
 AutoCreate Peer:        Off
 Match Auth Username:    No
 Allow unknown access:   No
 Allow subscriptions:    Yes
 Allow overlap dialing:  Yes
 Allow promisc. redir:   No
 Enable call counters:   Yes
 SIP domain support:     No
 Realm. auth:            No
 Our auth realm          asterisk
 Use domains as realms:  No
 Call to non-local dom.: Yes
 URI user is phone no:   No
 Always auth rejects:    Yes
 Direct RTP setup:       No
 User Agent:             Asterisk PBX 11.15.0
 SDP Session Name:       Asterisk PBX 11.15.0
 SDP Owner Name:         root
 Reg. context:           (not set)
 Regexten on Qualify:    No
 Trust RPID:             No
 Send RPID:              No
 Legacy userfield parse: No
 Send Diversion:         Yes
 Caller ID:              asterisk
 From: Domain:          
 Record SIP history:     Off
 Call Events:            Off
 Auth. Failure Events:   Off
 T.38 support:           No
 T.38 EC mode:           Unknown
 T.38 MaxDtgrm:          4294967295
 SIP realtime:           Disabled
 Qualify Freq :          60000 ms
 Q.850 Reason header:    No
 Store SIP_CAUSE:        No

Network QoS Settings:
---------------------------
 IP ToS SIP:             CS0
 IP ToS RTP audio:       CS0
 IP ToS RTP video:       CS0
 IP ToS RTP text:        CS0
 802.1p CoS SIP:         4
 802.1p CoS RTP audio:   5
 802.1p CoS RTP video:   6
 802.1p CoS RTP text:    5
 Jitterbuffer enabled:   No

Network Settings:
---------------------------
 SIP address remapping:  Enabled using externaddr
 Externhost:             <none>
 Externaddr:             #ServersPublicIP#:5060
 Externrefresh:          10
 Localnet:               192.168.122.0/255.255.255.255

Global Signalling Settings:
---------------------------
 Codecs:                 (gsm|ulaw|alaw|h263|testlaw)
 Codec Order:            none
 Relax DTMF:             No
 RFC2833 Compensation:   No
 Symmetric RTP:          No
 Compact SIP headers:    No
 RTP Keepalive:          0 (Disabled)
 RTP Timeout:            0 (Disabled)
 RTP Hold Timeout:       0 (Disabled)
 MWI NOTIFY mime type:   application/simple-message-summary
 DNS SRV lookup:         No
 Pedantic SIP support:   Yes
 Reg. min duration       60 secs
 Reg. max duration:      3600 secs
 Reg. default duration:  120 secs
 Sub. min duration       60 secs
 Sub. max duration:      3600 secs
 Outbound reg. timeout:  20 secs
 Outbound reg. attempts: 0
 Outbound reg. retry 403:0
 Notify ringing state:   Yes
   Include CID:          No
 Notify hold state:      No
 SIP Transfer mode:      open
 Max Call Bitrate:       384 kbps
 Auto-Framing:           No
 Outb. proxy:            <not set>
 Session Timers:         Accept
 Session Refresher:      uas
 Session Expires:        1800 secs
 Session Min-SE:         90 secs
 Timer T1:               500
 Timer T1 minimum:       100
 Timer B:                32000
 No premature media:     Yes
 Max forwards:           70

Default Settings:
-----------------
 Allowed transports:     UDP
 Outbound transport:     UDP
 Context:                unauthenticated
 Record on feature:      automon
 Record off feature:     automon
 Force rport:            Auto (No)
 DTMF:                   rfc2833
 Qualify:                0
 Keepalive:              0
 Use ClientCode:         No
 Progress inband:        Never
 Language:              
 Tone zone:              <Not set>
 MOH Interpret:          default
 MOH Suggest:            
 Voice Mail Extension:   asterisk

----
{code}

sip show peer
{code}
asterisk11-latest*CLI> sip show peer 799


 * Name       : 799
 Description  :
 Secret       : <Set>
 MD5Secret    : <Not set>
 Remote Secret: <Not set>
 Context      : localsets-common
 Record On feature : automon
 Record Off feature : automon
 Subscr.Cont. : <Not set>
 Language     :
 Tonezone     : <Not set>
 AMA flags    : Unknown
 Transfer mode: open
 CallingPres  : Presentation Allowed, Not Screened
 Callgroup    :
 Pickupgroup  :
 Named Callgr :
 Nam. Pickupgr:
 MOH Suggest  :
 Mailbox      :
 VM Extension : asterisk
 LastMsgsSent : 32767/65535
 Call limit   : 2147483647
 Max forwards : 0
 Dynamic      : Yes
 Callerid     : "" <>
 MaxCallBR    : 384 kbps
 Expire       : 3347
 Insecure     : no
 Force rport  : Auto (Yes)
 Symmetric RTP: No
 ACL          : No
 DirectMedACL : No
 T.38 support : No
 T.38 EC mode : Unknown
 T.38 MaxDtgrm: 4294967295
 DirectMedia  : No
 PromiscRedir : No
 User=Phone   : No
 Video Support: No
 Text Support : No
 Ign SDP ver  : No
 Trust RPID   : No
 Send RPID    : No
 TrustIDOutbnd: Legacy
 Subscriptions: Yes
 Overlap dial : Yes
 DTMFmode     : auto
 Timer T1     : 500
 Timer B      : 32000
 ToHost       :
 Addr->IP     : #ServerPublicIP#:2048
 Defaddr->IP  : (null)
 Prim.Transp. : UDP
 Allowed.Trsp : UDP
 Def. Username: 799
 SIP Options  : 100rel from-change replaces replace timer
 Codecs       : (ulaw|alaw|g722)
 Codec Order  : (g722:20,alaw:20,ulaw:20)
 Auto-Framing : No
 Status       : OK (55 ms)
 Useragent    : snom300/8.7.3.25.5
 Reg. Contact : sip:799@192.168.1.41:2048;line=sotxm5mm
 Qualify Freq : 60000 ms
 Keepalive    : 0 ms
 Sess-Timers  : Accept
 Sess-Refresh : uas
 Sess-Expires : 1800 secs
 Min-Sess     : 90 secs
 RTP Engine   : asterisk
 Parkinglot   :
 Use Reason   : No
 Encryption   : No
{code}

Now we get the same retransmit error, with a way different output: (full version attached above)
{code}
[Jan 27 18:22:18] DEBUG[1446] chan_sip.c: ** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #175
{code}

By: Michael L. Young (elguero) 2015-01-27 11:40:11.480-0600

I do see a difference in the settings.  On the 11.7 machine, you are not binding to the ANY address, {{::}}.  It would appear you are binding to {{0.0.0.0}}.  Is that correct?

If so, can you try setting the {{udpbindaddr}} in sip.cfg in the 13.1 and this new 11.15 server to {{0.0.0.0}} instead of the ANY address and see if there is any difference?

By: Lukas Hauser (luka5) 2015-01-27 12:19:33.971-0600

You're right. Thank you so much.
I tried it with the 13.1 machine and it seems to work. (Can't test the 11.15 version right now)

{code}
;  c) Listen on the IPv4 wildcard.            Example: bindaddr=0.0.0.0
;  d) Listen on the IPv4 and IPv6 wildcards.  Example: bindaddr=::
...
; (Note that using bindaddr=:: will show only a single IPv6 socket in netstat.
;  IPv4 is supported at the same time using IPv4-mapped IPv6 addresses.)
{code}
I missed the last part, I though it would work with IPv4 addresses without mapping them.

Nevertheless, this is a strange behavior, isn't it?

By: Matt Jordan (mjordan) 2015-02-16 11:39:51.221-0600

Not really. Binding to an IPv6 wildcard is not really the same thing as binding to an IPv4 wildcard. In fact, the SIP settings even tell you that:
{quote}
{noformat}
    [::] may include IPv4 in addition to IPv6, if such a feature is enabled in the OS.
{noformat}
{quote}

How those addresses are represented when the OS hands them back to Asterisk are different, as typically using an IPv6 bind all address will hand back the IPv4 address as an IPv6 tunnelled address - which is why using an IPv4 mask for your localnet settings won't work.

As it is, this is expected in this case: if you are going to use IPv6 for your bind information, you need to use IPv6 mapped addresses elsewhere as well.