[Home]

Summary:ASTERISK-17841: Notify contact and via header port is 0
Reporter:rsw686 (rsw686)Labels:
Date Opened:2011-05-11 13:29:28Date Closed:2015-03-15 14:06:42
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) internip_zero_port.patch
Description:When running sip notify the contact and via header port is 0. This still works with polycom-check-cfg as the phone ignores the port and sends back a 200 OK. Cisco cisco-check-cfg fails with transmission timeout. Ideally the port should be defined correctly.

****** ADDITIONAL INFORMATION ******

voip*CLI> sip notify polycom-check-cfg 1050
Sending NOTIFY of type 'polycom-check-cfg' to '1050'
Scheduling destruction of SIP dialog '6ec133e91c835b0e2181543a03ad7348@voip.mydomain.com' in 32000 ms (Method: NOTIFY)
Reliably Transmitting (NAT) to 10.10.1.149:5061:
NOTIFY sip:1050@10.10.1.149:5061 SIP/2.0
Via: SIP/2.0/UDP 10.10.1.17:0;branch=z9hG4bK00217f24;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@voip.mydomain.com>;tag=as4b0e4c18
To: <sip:1050@10.10.1.149:5061>
Contact: <sip:Unknown@10.10.1.17:0>
Call-ID: 6ec133e91c835b0e2181543a03ad7348@voip.mydomain.com
CSeq: 102 NOTIFY
User-Agent: FPBX-2.7.0(1.8.4)
Date: Wed, 11 May 2011 18:22:21 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Subscription-State: terminated
Event: check-sync
Content-Length: 0


---

<--- SIP read from UDP:10.10.1.149:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.1.17;branch=z9hG4bK00217f24;rport
From: "Unknown" <sip:Unknown@voip.mydomain.com>;tag=as4b0e4c18
To: "User 1050" <sip:1050@10.10.1.149:5061>;tag=2538ABF5-B32EE01A
CSeq: 102 NOTIFY
Call-ID: 6ec133e91c835b0e2181543a03ad7348@voip.mydomain.com
Contact: <sip:1050@10.10.1.149:5061>
Event: check-sync
User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.3.1.0769
Accept-Language: en
Content-Length: 0

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




voip*CLI> sip notify cisco-check-cfg 2002
Sending NOTIFY of type 'cisco-check-cfg' to '2002'
Scheduling destruction of SIP dialog '431b6fae4d9cafa96decce8b252d64a7@voip.mydomain.com' in 32000 ms (Method: NOTIFY)
Reliably Transmitting (no NAT) to 10.10.1.148:5060:
NOTIFY sip:2002@10.10.1.148:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.10.1.17:0;branch=z9hG4bK2dbb624a
Max-Forwards: 70
From: "Unknown" <sip:Unknown@voip.mydomain.com>;tag=as5e720b41
To: <sip:2002@10.10.1.148:5060;transport=udp>
Contact: <sip:Unknown@10.10.1.17:0>
all-ID: 431b6fae4d9cafa96decce8b252d64a7@voip.mydomain.com
CSeq: 102 NOTIFY
User-Agent: FPBX-2.7.0(1.8.4)
Date: Wed, 11 May 2011 18:23:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Subscription-State: terminated
Event: check-sync
Content-Length: 0


---
Retransmitting #1 (no NAT) to 10.10.1.148:5060:
NOTIFY sip:2002@10.10.1.148:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.10.1.17:0;branch=z9hG4bK2dbb624a
Max-Forwards: 70
From: "Unknown" <sip:Unknown@voip.mydomain.com>;tag=as5e720b41
To: <sip:2002@10.10.1.148:5060;transport=udp>
Contact: <sip:Unknown@10.10.1.17:0>
Call-ID: 431b6fae4d9cafa96decce8b252d64a7@voip.mydomain.com
CSeq: 102 NOTIFY
User-Agent: FPBX-2.7.0(1.8.4)
Date: Wed, 11 May 2011 18:23:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Subscription-State: terminated
Event: check-sync
Content-Length: 0

[May 11 14:23:51] WARNING[32528]: chan_sip.c:3547 retrans_pkt: Retransmission timeout reached on transmission 431b6fae4d9cafa96decce8b252d64a7@voip.mydomain.com for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6399ms with no response
Comments:By: Irontec (irontec) 2011-12-12 12:31:36.373-0600

It seems that Notify VIA and Contact headers use internip.

This can be set to bindaddr:bindport but if your bindaddr is any (0.0.0.0) it resolves local address and leave the port empty.

I've added two lines that seems to work for us, but I'm not really sure what is the true impact.

By: Joshua C. Colp (jcolp) 2015-03-15 14:06:42.639-0500

This issue appears to have been resolved in later versions.