[asterisk-users] Support a malformed SIP INVITE

Tom Playford tom.playford at gmail.com
Wed Aug 16 04:27:15 MST 2006


Hello all,

We have a pathetic legacy PBX that produces the most terrible SIP
INVITE packet. In the past we have found a phone that can hope and
just used that. We now want to connect the legacy PBX to asterisk, and
we're (well, I'm) having problems.

This is the INVITE that's sent to the asterisk server (ip 192.168.0.240)

-----------------
INVITE sip:PBX.400T-portal SIP/2.0
To: "01000"<:Eurydice at 192.168.0.240>
From: <:>;tag=8af2812a
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
Contact: "PBX.400T-portal"<sip:192.168.0.181:5060>
Max-Forwards: 70
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE
Content-Type: application/sdp
Date: Sun, 16 Sep 2076 19:04:20 GMT
upported: sip-cc, sip-cc-01, timer, replaces
User-Agent: PBX.400T-portal
Content-Length: 276
-------------

Nasty, eh?

At the moment asterisk just says it's not a SIP address and sends a
404. I have put the full trace of how asterisk respnds.

Does anyone have any ideas on how to get asterisk to accept an INVITE like this?

Thanks,

Tom

------

The full asterisk response to the INVITE:
-------------
INVITE sip:PBX.400T-portal SIP/2.0
To: "01000"<:Eurydice at 192.168.0.240>
From: <:>;tag=8af2812a
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
Contact: "PBX.400T-portal"<sip:192.168.0.181:5060>
Max-Forwards: 70
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE
Content-Type: application/sdp
Date: Sun, 16 Sep 2076 19:04:20 GMT
upported: sip-cc, sip-cc-01, timer, replaces
User-Agent: PBX.400T-portal
Content-Length: 276

v=0
o=gsm-sip-portal 1 1 IN IP4 192.168.0.181
s=gsm-sip-voice-call
c=IN IP4 192.168.0.181
t=0 0
m=audio 8000 RTP/AVP 3 0 8 13 101
a=fmtp:101 0-16
a=rtpmap:3 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:101 telephone-event/8000

--- (15 headers 12 lines)---
Using INVITE request as basis request - GSM-SIPCall-Number-1
Sending to 192.168.0.181 : 5060 (NAT)
Aug 16 11:58:58 NOTICE[4587]: chan_sip.c:7112 check_user_full: From
address missing 'sip:', using it anyway
Found peer '01000'
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 13
Found RTP audio format 101
Peer audio RTP is at port 192.168.0.181:8000
Found description format PCMA
Found description format PCMU
Found description format PCMA
Found description format CN
Found description format telephone-event
Capabilities: us - 0x8 (alaw), peer - audio=0xc (ulaw|alaw)/video=0x0
(nothing), combined - 0x8 (alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x3
(telephone-event|CN), combined - 0x1 (telephone-event)
Aug 16 11:58:58 WARNING[4587]: chan_sip.c:6650 get_destination: Huh?
Not a SIP header (:)?
Reliably Transmitting (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Retransmitting #1 (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Retransmitting #2 (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Retransmitting #3 (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Retransmitting #4 (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Retransmitting #5 (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Retransmitting #6 (no NAT) to 192.168.0.181:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.0.181;branch=z9hG4bK-d87543-24f99000ddafb002-1--d87543-;rport;received=192.168.0.181
From: <:>;tag=8af2812a
To: "01000"<:Eurydice at 192.168.0.240>;tag=as757d8c87
Call-ID: GSM-SIPCall-Number-1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:PBX.400T-portal at 192.168.0.240>
Content-Length: 0


---
Aug 16 11:59:18 WARNING[4587]: chan_sip.c:1217 retrans_pkt: Maximum
retries exceeded on transmission GSM-SIPCall-Number-1 for seqno 1
(Critical Response)
Destroying call 'GSM-SIPCall-Number-1'



More information about the asterisk-users mailing list