[asterisk-users] Not a valid SIP contact - Asterisk 1.4.21.1 Mitel SIP phones

2008-07-19 Thread Mark Wiater
Hi,

I have a client using Mitel 5212 phones in SIP mode with a 1.4.21.1 
Asterisk server (and a couple of previous 1.4 versions). They're 
mostly happy with the combination except for this one issue.

For incoming calls only, either originating from other local SIP 
phones or from a PRI, calls won't get bridged (remote party get's 
hung up) if the call is answer too quickly on the Mitel. Or so it 
seems. The receiving Mitel phone thinks the call is in session though.

Oh... this does not happen all of the time, maybe 50%.

Asterisk is reporting errors like:

[Jul 19 10:46:41] NOTICE[2466]: chan_sip.c:8068 
set_address_from_contact: '72.16.1.20;tag=as7b9f4bfb' is not a 
valid SIP contact (missing sip:) trying to use anyway
[Jul 19 10:46:41] WARNING[2466]: chan_sip.c:8097 
set_address_from_contact: Invalid host name in Contact: (can't 
resolve in DNS) : '72.16.1.20'
[Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host '72.16.1.20'
[Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host '72.16.1.20'

or

[Jul 19 10:45:03] NOTICE[2466]: chan_sip.c:8068 
set_address_from_contact: '172.16.1.20;tag=as4a1b11c8' is not a 
valid SIP contact (missing sip:) trying to use anyway
[Jul 19 10:45:03] WARNING[2466]: chan_sip.c:8097 
set_address_from_contact: Invalid host name in Contact:  can't 
resolve in DNS) : '172.16.1.20'
[Jul 19 10:45:04] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host '172.16.1.20'
[Jul 19 10:45:04] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host '172.16.1.20'

or

[Jul 19 10:52:18] NOTICE[2466]: chan_sip.c:8068 
set_address_from_contact: 'nt-Length:0' is not a valid SIP contact 
(missing sip:) trying to use anyway
[Jul 19 10:52:18] WARNING[2466]: chan_sip.c:8097 
set_address_from_contact: Invalid host name in Contact: (can't 
resolve in DNS) : 'nt-Length'
[Jul 19 10:52:18] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host 'nt-Length'
[Jul 19 10:52:18] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host 'nt-Length'
--  SIP/517-09215fb0 answered SIP/512-09258c78
  -- Native bridging SIP/512-09258c78 and SIP/517-09215fb0
[Jul 19 10:52:18] WARNING[22054]: chan_sip.c:5839 set_destination: 
Can't find address for host 'nt-Length'
-- Got SIP response 416 Unsupported URI Scheme back from 172.16.1.157
[Jul 19 10:52:18] WARNING[2466]: chan_sip.c:5839 set_destination: 
Can't find address for host 'nt-Length'

So it seems that the Mitel phone is sending a bad contact field in 
SIP. I've confirmed via tcpdump that this is what's in the SIP 
packet on the wire.

I wanted to try a different version of SIP on the Mitel but that 
doesn't seem to be an option, it's not available for download and 
the local Mitel vendor can't seem to get his hands on anything newer 
than 6.0.0.something, though there is supposedly 7.1.x available. 
These phones are running 06.00.00.19.

The Asterisk server has a pretty standard sip.conf,

bindaddr=0.0.0.0
pedantic=no;
bindport=5060
srvlookup=no
tos_video=af41
notifyringing=yes
notifyhold=yes
allowsubscribe=yes
limitonpeer=yes
localnet=172.16.1.0/255.255.255.0

Polycom phones on this same asterisk server do not display this 
behavior.

I'm wondering if there is a workaround for this apparent Mitel issue 
in Asterisk's configuration. Anyone using this combination with success?

Thanks in advance for any thoughts

Mark


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Not a valid SIP contact - Asterisk 1.4.21.1 Mitel SIP phones

2008-07-19 Thread Matt Watson
On July 19, 2008 11:22:08 am Mark Wiater wrote:
 Hi,

 I have a client using Mitel 5212 phones in SIP mode with a 1.4.21.1
 Asterisk server (and a couple of previous 1.4 versions). They're
 mostly happy with the combination except for this one issue.

 For incoming calls only, either originating from other local SIP
 phones or from a PRI, calls won't get bridged (remote party get's
 hung up) if the call is answer too quickly on the Mitel. Or so it
 seems. The receiving Mitel phone thinks the call is in session though.

 Asterisk is reporting errors like:

 [Jul 19 10:46:41] NOTICE[2466]: chan_sip.c:8068
 set_address_from_contact: '72.16.1.20;tag=as7b9f4bfb' is not a
 valid SIP contact (missing sip:) trying to use anyway
 [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:8097
 set_address_from_contact: Invalid host name in Contact: (can't
 resolve in DNS) : '72.16.1.20'
 [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination:
 Can't find address for host '72.16.1.20'
 [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination:
 Can't find address for host '72.16.1.20'


Might want to post a sip debug of one of the sessions from the Mitel phone.


-- 
Matt Watson
http://www.mattgwatson.ca

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Not a valid SIP contact - Asterisk 1.4.21.1 Mitel SIP phones

2008-07-19 Thread Mark Wiater
Matt Watson wrote:
 On July 19, 2008 11:22:08 am Mark Wiater wrote:
 Hi,

 I have a client using Mitel 5212 phones in SIP mode with a 1.4.21.1
 Asterisk server (and a couple of previous 1.4 versions). They're
 mostly happy with the combination except for this one issue.

 For incoming calls only, either originating from other local SIP
 phones or from a PRI, calls won't get bridged (remote party get's
 hung up) if the call is answer too quickly on the Mitel. Or so it
 seems. The receiving Mitel phone thinks the call is in session though.
 
 Asterisk is reporting errors like:

 [Jul 19 10:46:41] NOTICE[2466]: chan_sip.c:8068
 set_address_from_contact: '72.16.1.20;tag=as7b9f4bfb' is not a
 valid SIP contact (missing sip:) trying to use anyway
 [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:8097
 set_address_from_contact: Invalid host name in Contact: (can't
 resolve in DNS) : '72.16.1.20'
 [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination:
 Can't find address for host '72.16.1.20'
 [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination:
 Can't find address for host '72.16.1.20'

 
 Might want to post a sip debug of one of the sessions from the Mitel phone.
 
 

Thanks Matt

I was also able to test this with Mitel's firmware version 7.0.0.8 
with the same results.

Mitel phone still acts like it's on a call, Asterisk does not nor 
does the originating phone.

PBX*CLI sip set debug peer 517
SIP Debugging Enabled for IP: 172.16.1.174:5060
   Audio is at 172.16.1.20 port 15594
   Adding codec 0x4 (ulaw) to SDP
   Adding non-codec 0x1 (telephone-event) to SDP
   Reliably Transmitting (no NAT) to 172.16.1.174:5060:
INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 172.16.1.20:5060;branch=z9hG4bK38581b5a;rport
From: 512 sip:[EMAIL PROTECTED];tag=as7ec9e8af
To: sip:[EMAIL PROTECTED]
Contact: sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sat, 19 Jul 2008 17:20:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 236

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

---
PBX*CLI
--- SIP read from 172.16.1.174:5060 ---
SIP/2.0 100 Trying
Via:SIP/2.0/UDP 
172.16.1.20:5060;rport=5060;received=172.16.1.20;branch=z9hG4bK38581b5a
From:512 sip:[EMAIL PROTECTED];tag=as7ec9e8af
To:sip:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965
CSeq:102 INVITE
User-Agent:Mitel-5212-SIP-Phone 07.00.00.08 08000F32A6C1
Call-ID:[EMAIL PROTECTED]
Content-Length:0


-
   --- (8 headers 0 lines) ---
PBX*CLI
--- SIP read from 172.16.1.174:5060 ---
SIP/2.0 180 Ringing
Via:SIP/2.0/UDP 
172.16.1.20:5060;rport=5060;received=172.16.1.20;branch=z9hG4bK38581b5a
From:512 sip:[EMAIL PROTECTED];tag=as7ec9e8af
To:sip:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965
CSeq:102 INVITE
User-Agent:Mitel-5212-SIP-Phone 07.00.00.08 08000F32A6C1
Call-ID:[EMAIL PROTECTED]
Allow-Events:talk,hold,conference
Content-Length:0


-
   --- (9 headers 0 lines) ---
PBX*CLI
--- SIP read from 172.16.1.174:5060 ---
SIP/2.0 200 OK
Via:SIP/2.0/UDP 
172.16.1.20:5060;rport=5060;received=172.16.1.20;branch=z9hG4bK38581b5a
From:512 sip:[EMAIL PROTECTED];tag=as7ec9e8af
To:sip:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965
CSeq:102 INVITE
User-Agent:Mitel-5212-SIP-Phone 07.00.00.08 08000F32A6C1
Call-ID:[EMAIL PROTECTED]
Contact:p:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965
CSeq:102 INVITE
User sip:[EMAIL PROTECTED]
Allow-Events:talk,hold,conference
Allow:INVITE,ACK,CANCEL,BYE,OPTIONS,REFER,NOTIFY,PRACK,UPDATE
Supported:timer,100rel,replaces
Content-Type:application/sdp
Content-Length:182

v=0
o=517 1216473942 1216473941 IN IP4 172.16.1.174
s=SIP Call
c=IN IP4 172.16.1.174
t=0 0
m=audio 20012 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000

-
   --- (15 headers 8 lines) ---
   Found RTP audio format 0
   Found RTP audio format 101
   Peer audio RTP is at port 172.16.1.174:20012
   Found audio description format PCMU for ID 0
   Found audio description format telephone-event for ID 101
   Capabilities: us - 0x4 (ulaw), peer - audio=0x4 (ulaw)/video=0x0 
(nothing), combined - 0x4 (ulaw)
   Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 
0x1 (telephone-event), combined - 0x1 (telephone-event)
   Peer audio RTP is at port 172.16.1.174:20012
[Jul 19 13:20:56] NOTICE[2466]: chan_sip.c:8068 
set_address_from_contact: 
'p:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965' is not a valid SIP 
contact (missing sip:) trying to use anyway
[Jul 19 13:20:56] WARNING[2466]: chan_sip.c:8097 
set_address_from_contact: Invalid host name in Contact: (can't 
resolve in DNS) : '172.16.1.174'
   list_route: hop: p:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965
   set_destination: Parsing 
p:[EMAIL 

Re: [asterisk-users] Not a valid SIP contact - Asterisk 1.4.21.1 Mitel SIP phones

2008-07-19 Thread Grygoriy Dobrovolskyy
Maybe stupid solution but, when Mitel phone i called, why dont you pickup
put the person on hold, call Mitel phone, and connect them, what i want to
say, add some delay.

2008/7/19 Mark Wiater [EMAIL PROTECTED]:

 Matt Watson wrote:
  On July 19, 2008 11:22:08 am Mark Wiater wrote:
  Hi,
 
  I have a client using Mitel 5212 phones in SIP mode with a 1.4.21.1
  Asterisk server (and a couple of previous 1.4 versions). They're
  mostly happy with the combination except for this one issue.
 
  For incoming calls only, either originating from other local SIP
  phones or from a PRI, calls won't get bridged (remote party get's
  hung up) if the call is answer too quickly on the Mitel. Or so it
  seems. The receiving Mitel phone thinks the call is in session though.
 
  Asterisk is reporting errors like:
 
  [Jul 19 10:46:41] NOTICE[2466]: chan_sip.c:8068
  set_address_from_contact: '72.16.1.20;tag=as7b9f4bfb' is not a
  valid SIP contact (missing sip:) trying to use anyway
  [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:8097
  set_address_from_contact: Invalid host name in Contact: (can't
  resolve in DNS) : '72.16.1.20'
  [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination:
  Can't find address for host '72.16.1.20'
  [Jul 19 10:46:41] WARNING[2466]: chan_sip.c:5839 set_destination:
  Can't find address for host '72.16.1.20'
 
 
  Might want to post a sip debug of one of the sessions from the Mitel
 phone.
 
 

 Thanks Matt

 I was also able to test this with Mitel's firmware version 7.0.0.8
 with the same results.

 Mitel phone still acts like it's on a call, Asterisk does not nor
 does the originating phone.

 PBX*CLI sip set debug peer 517
 SIP Debugging Enabled for IP: 172.16.1.174:5060
   Audio is at 172.16.1.20 port 15594
   Adding codec 0x4 (ulaw) to SDP
   Adding non-codec 0x1 (telephone-event) to SDP
   Reliably Transmitting (no NAT) to 172.16.1.174:5060:
 INVITE sip:[EMAIL PROTECTED] [EMAIL PROTECTED] SIP/2.0
 Via: SIP/2.0/UDP 172.16.1.20:5060;branch=z9hG4bK38581b5a;rport
 From: 512 sip:[EMAIL PROTECTED] [EMAIL PROTECTED];tag=as7ec9e8af
 To: sip:[EMAIL PROTECTED] [EMAIL PROTECTED]
 Contact: sip:[EMAIL PROTECTED] [EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 CSeq: 102 INVITE
 User-Agent: Asterisk PBX
 Max-Forwards: 70
 Date: Sat, 19 Jul 2008 17:20:54 GMT
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Content-Type: application/sdp
 Content-Length: 236

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

 ---
 PBX*CLI
 --- SIP read from 172.16.1.174:5060 ---
 SIP/2.0 100 Trying
 Via:SIP/2.0/UDP
 172.16.1.20:5060;rport=5060;received=172.16.1.20;branch=z9hG4bK38581b5a
 From:512 sip:[EMAIL PROTECTED] [EMAIL PROTECTED];tag=as7ec9e8af
 To:sip:[EMAIL PROTECTED] [EMAIL PROTECTED]
 ;tag=4881ea36-2ca-6747d965
 CSeq:102 INVITE
 User-Agent:Mitel-5212-SIP-Phone 07.00.00.08 08000F32A6C1
 Call-ID:[EMAIL PROTECTED][EMAIL PROTECTED]
 Content-Length:0


 -
   --- (8 headers 0 lines) ---
 PBX*CLI
 --- SIP read from 172.16.1.174:5060 ---
 SIP/2.0 180 Ringing
 Via:SIP/2.0/UDP
 172.16.1.20:5060;rport=5060;received=172.16.1.20;branch=z9hG4bK38581b5a
 From:512 sip:[EMAIL PROTECTED] [EMAIL PROTECTED];tag=as7ec9e8af
 To:sip:[EMAIL PROTECTED] [EMAIL PROTECTED]
 ;tag=4881ea36-2ca-6747d965
 CSeq:102 INVITE
 User-Agent:Mitel-5212-SIP-Phone 07.00.00.08 08000F32A6C1
 Call-ID:[EMAIL PROTECTED][EMAIL PROTECTED]
 Allow-Events:talk,hold,conference
 Content-Length:0


 -
   --- (9 headers 0 lines) ---
 PBX*CLI
 --- SIP read from 172.16.1.174:5060 ---
 SIP/2.0 200 OK
 Via:SIP/2.0/UDP
 172.16.1.20:5060;rport=5060;received=172.16.1.20;branch=z9hG4bK38581b5a
 From:512 sip:[EMAIL PROTECTED] [EMAIL PROTECTED];tag=as7ec9e8af
 To:sip:[EMAIL PROTECTED] [EMAIL PROTECTED]
 ;tag=4881ea36-2ca-6747d965
 CSeq:102 INVITE
 User-Agent:Mitel-5212-SIP-Phone 07.00.00.08 08000F32A6C1
 Call-ID:[EMAIL PROTECTED][EMAIL PROTECTED]
 Contact:p:[EMAIL PROTECTED] [EMAIL PROTECTED]
 ;tag=4881ea36-2ca-6747d965
 CSeq:102 INVITE
 User sip:[EMAIL PROTECTED] [EMAIL PROTECTED]
 Allow-Events:talk,hold,conference
 Allow:INVITE,ACK,CANCEL,BYE,OPTIONS,REFER,NOTIFY,PRACK,UPDATE
 Supported:timer,100rel,replaces
 Content-Type:application/sdp
 Content-Length:182

 v=0
 o=517 1216473942 1216473941 IN IP4 172.16.1.174
 s=SIP Call
 c=IN IP4 172.16.1.174
 t=0 0
 m=audio 20012 RTP/AVP 0 101
 a=rtpmap:0 PCMU/8000
 a=rtpmap:101 telephone-event/8000

 -
   --- (15 headers 8 lines) ---
   Found RTP audio format 0
   Found RTP audio format 101
   Peer audio RTP is at port 172.16.1.174:20012
   Found audio description format PCMU for ID 0
   Found audio description format telephone-event for ID 101
   Capabilities: us - 0x4 (ulaw), peer - audio=0x4 (ulaw)/video=0x0
 (nothing), combined - 0x4 (ulaw)
   Non-codec capabilities 

Re: [asterisk-users] Not a valid SIP contact - Asterisk 1.4.21.1 Mitel SIP phones

2008-07-19 Thread Grey Man
 2008/7/19 Mark Wiater [EMAIL PROTECTED]:

Your problem is the Contact header coming back in the Mitel's Ok response.

Contact:p:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965

Asterisk is not going to be able to parse that! It should be:

Contact: sip:[EMAIL PROTECTED];tag=4881ea36-2ca-6747d965

I'd get your Mitel vendor to log a fault about that. It's a big
problem as the Contact field is critical for further in-dialogue SIP
requests such as transfer related requests and BYEs.

Regards,

Greyman.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users