[asterisk-dev] SIP issue (chan_sip.c:7724 set_address_from_contact) with Nortel CS1K

Christopher Thompson christopher.thompson at zen.co.uk
Fri Mar 30 14:52:27 MST 2007


Hello,

I am trying interop a Nortel CS1K enterprise switch with * using SIP. In 
version 1.2, * calling nortel was ok, and nortel calling * was failing 
due to a problem with SDP parsing on multipart messages. This was later 
solved with a small patch.

I have recently upgraded to * version 1.4.2 and now * calling nortel is 
broken.

Scenario:

SIP Set (Xlite) ------ * --------Nortel CS1K ------ Nortel IP Set

The nortel set rings, and when its picked up, the call immediately cuts 
off on the nortel side.

I see this error message:

[Mar 27 16:55:09] WARNING[20850]: chan_sip.c:7724 
set_address_from_contact: Invalid host name in Contact: (can't resolve 
in DNS) : '65602093'

Also strange is that the xlite client believes the call is still up. 
Looking at a sniffer trace, I see that * sends a ACK and then BYE 
immedately after the OK is received. However this isnt tandemed onto the 
other leg. When I hang up the Xlite I get a "call leg no longer active" 
or some such error come back.

Looking through the code, the problem is occuring at line 7724, it seems 
that * is trying to DNS lookup the "contact" information, for some 
reason. Anyway, nortel has put a phone number in there so its no 
surprise its failed. Nortel does use the shorthand c=IN IP4 x.x.x.x for 
its media contact. Interesting * has decoded this correctly in the SIP 
debug its correctly found the media IP and port for the far end. So 
whats the problem?

I think 7724 is called from line 11734 and the comments suggest that 
it’s a "bad contact" but actually it isnt (or is it?). I would like to 
hack this but I don’t understand enough about why its trying to do this, 
esp since it didn’t do this in 1.2.

Any ideas?

SIP Debug
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

christth-linux*CLI>
Audio is at 47.165.85.5 port 8668
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 47.160.109.70:5060:
INVITE sip:65602093 at 47.160.109.70 SIP/2.0
Via: SIP/2.0/UDP 47.165.85.5:5060;branch=z9hG4bK17f726e2;rport
From: "Asterisk SIP" <sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>
Contact: <sip:4225 at 47.165.85.5>
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 102 INVITE
User-Agent: Nortel CS1000 SIP GW
Max-Forwards: 70
Date: Tue, 27 Mar 2007 15:55:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 261

v=0
o=root 20831 20831 IN IP4 47.165.85.5
s=session
c=IN IP4 47.165.85.5
t=0 0
m=audio 8668 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
christth-linux*CLI>
<--- SIP read from 47.160.109.70:5060 --->
SIP/2.0 100 Trying
From: "Asterisk SIP"<sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 102 INVITE
Via: SIP/2.0/UDP 47.165.85.5:5060;rport=5060;branch=z9hG4bK17f726e2
Supported: 100rel,sipvc,replaces,timer
User-Agent: Nortel CS1000 SIP GW release_4.5 version_sse-4.50.88
Contact: <sip:65602093 at 47.160.109.70>
Allow: 
INVITE,ACK,BYE,REGISTER,REFER,NOTIFY,CANCEL,PRACK,OPTIONS,INFO,SUBSCRIBE,UPDATE
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
christth-linux*CLI>
<--- SIP read from 47.160.109.70:5060 --->
SIP/2.0 180 Ringing
From: "Asterisk SIP"<sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 102 INVITE
Via: SIP/2.0/UDP 47.165.85.5:5060;rport=5060;branch=z9hG4bK17f726e2
Supported: 100rel,sipvc,replaces,timer
User-Agent: Nortel CS1000 SIP GW release_4.5 version_sse-4.50.88
Contact: 
<sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone>
Allow: 
INVITE,ACK,BYE,REGISTER,REFER,NOTIFY,CANCEL,PRACK,OPTIONS,INFO,SUBSCRIBE,UPDATE
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
christth-linux*CLI>
<--- SIP read from 47.160.109.70:5060 --->
SIP/2.0 200 OK
From: "Asterisk SIP"<sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 102 INVITE
Via: SIP/2.0/UDP 47.165.85.5:5060;rport=5060;branch=z9hG4bK17f726e2
Supported: 100rel,sipvc,replaces,timer
User-Agent: Nortel CS1000 SIP GW release_4.5 version_sse-4.50.88
P-Asserted-Identity: "thompson 
christopher"<sip:65602093;phone-context=*BLANKED*;user=phone>
Privacy: none
Contact: 
<sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone>
Allow: 
INVITE,ACK,BYE,REGISTER,REFER,NOTIFY,CANCEL,PRACK,OPTIONS,INFO,SUBSCRIBE,UPDATE
Content-Type: application/SDP
Content-Length: 120

v=0
o=- 7 1 IN IP4 47.160.109.70
s=-
t=0 0
m=audio 5200 RTP/AVP 8
c=IN IP4 47.160.126.137
a=ptime:20
a=sendrecv

<------------->
--- (14 headers 8 lines) ---
Found RTP audio format 8
Peer audio RTP is at port 47.160.126.137:5200
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x8 (alaw)/video=0x0 
(nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 
(nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 47.160.126.137:5200
[Mar 27 16:55:09] WARNING[20850]: chan_sip.c:7724 
set_address_from_contact: Invalid host name in Contact: (can't resolve 
in DNS) : '65602093'

list_route: hop: 
<sip:65602093;phone-context=*BLANKED*;:5060;maddr=47.160.109.70;transport=udp;user=phone>
set_destination: Parsing 
<sip:65602093;phone-context=*BLANKED*;5060;maddr=47.160.109.70;transport=udp;user=phone> 
for address/port to send to

set_destination: set destination to 47.160.109.70, port 5060
Transmitting (no NAT) to 47.160.109.70:5060:
ACK 
sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone 
SIP/2.0
Via: SIP/2.0/UDP 47.165.85.5:5060;branch=z9hG4bK7aa5cd00;rport
From: "Asterisk SIP" <sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Contact: <sip:4225 at 47.165.85.5>
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 102 ACK
User-Agent: Nortel CS1000 SIP GW
Max-Forwards: 70
Content-Length: 0


---
set_destination: Parsing 
<sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone> 
for address/port to send to

set_destination: set destination to 47.160.109.70, port 5060
Reliably Transmitting (no NAT) to 47.160.109.70:5060:
BYE 
sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone 
SIP/2.0
Via: SIP/2.0/UDP 47.165.85.5:5060;branch=z9hG4bK26add78c;rport
From: "Asterisk SIP" <sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 103 BYE
User-Agent: Nortel CS1000 SIP GW
Max-Forwards: 70
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---
Scheduling destruction of SIP dialog 
'272d74695f95781604144a4765b87dff at 47.165.85.5' in 32000 ms (Method: INVITE)
christth-linux*CLI>
<--- SIP read from 47.160.109.70:5060 --->
SIP/2.0 200 OK
From: "Asterisk SIP"<sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 103 BYE
Via: SIP/2.0/UDP 47.165.85.5:5060;rport=5060;branch=z9hG4bK26add78c
Supported: 100rel,sipvc,replaces,timer
User-Agent: Nortel CS1000 SIP GW release_4.5 version_sse-4.50.88
Allow: 
INVITE,ACK,BYE,REGISTER,REFER,NOTIFY,CANCEL,PRACK,OPTIONS,INFO,SUBSCRIBE,UPDATE
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
Scheduling destruction of SIP dialog 
'272d74695f95781604144a4765b87dff at 47.165.85.5' in 32000 ms (Method: INVITE)
set_destination: Parsing 
<sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone> 
for address/port to send to

set_destination: set destination to 47.160.109.70, port 5060
Reliably Transmitting (no NAT) to 47.160.109.70:5060:
BYE 
sip:65602093;phone-context=*BLANKED*:5060;maddr=47.160.109.70;transport=udp;user=phone 
SIP/2.0
Via: SIP/2.0/UDP 47.165.85.5:5060;branch=z9hG4bK1ba999b3;rport
From: "Asterisk SIP" <sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 104 BYE
User-Agent: Nortel CS1000 SIP GW
Max-Forwards: 70
Content-Length: 0


---
christth-linux*CLI>
<--- SIP read from 47.160.109.70:5060 --->
SIP/2.0 481 Call Leg/Transaction Does Not Exist
From: "Asterisk SIP"<sip:4225 at 47.165.85.5>;tag=as562399b0
To: <sip:65602093 at 47.160.109.70>;tag=466da02f-13c4-46094c5d-6b3ccc-45f
Call-ID: 272d74695f95781604144a4765b87dff at 47.165.85.5
CSeq: 104 BYE
Via: SIP/2.0/UDP 47.165.85.5:5060;rport=5060;branch=z9hG4bK1ba999b3
Supported: 100rel,sipvc,replaces,timer
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
[Mar 27 16:55:13] WARNING[20850]: chan_sip.c:12311 handle_response: 
Remote host can't match request BYE to call 
'272d74695f95781604144a4765b87dff at 47.165.85.5'. Giving up.

Really destroying SIP dialog 
'272d74695f95781604144a4765b87dff at 47.165.85.5' Method: INVITE

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Regards,
Chris Thompson




More information about the asterisk-dev mailing list