Kurt Knudsen wrote:
> Specs: Asterisk 1.4.22 running behind a SonicWall (transparent mode)
> with a public IP address. We have our phone system setup as 172.16.2.x
> that connect through the SonicWall to Asterisk. Incoming calls work
> flawlessly and we no longer get one-way audio. We are only using SIP
> (3 trunks now, instead of 2) and having all 3 in use is not an issue.
>
> Problem: Make a call on a Polycom 320 IP phone to any number and (4/5
> times) it will drop the call after 30 seconds. I noticed that the
> little timer that pops up on the LCD on the phone is missing when a
> call will be dropped. This timer appears when the phone is answered,
> so I have about 30 seconds to talk to them before the call is just
> dropped.
>
> Known Causes: It's a NAT issue, I know that much, I just don't know
> how to fix it. SIP debugging shows that it attempts to retransmit
> packets to my phone and since it can't, it drops it after 30 seconds.
>
> Log snippet:
> -- Executing [EMAIL PROTECTED]:19] Dial("SIP/203-b7a2b558",
> "SIP/bw_outbound/+18005551212|300|") in new stack
> Audio is at <public IP> port 11968
> Adding codec 0x4 (ulaw) to SDP
> Adding codec 0x100 (g729) to SDP
> Adding non-codec 0x1 (telephone-event) to SDP
> Reliably Transmitting (no NAT) to 216.82.224.202:5060:
> INVITE sip:[EMAIL PROTECTED] SIP/2.0
> Via: SIP/2.0/UDP <public IP>:5060;branch=z9hG4bK6ea30a1a;rport
> From: "8881231234" <sip:[EMAIL PROTECTED] IP>;tag=as3ed791f3
> To: <sip:[EMAIL PROTECTED]>
> Contact: <sip:[EMAIL PROTECTED] IP>
> Call-ID: [EMAIL PROTECTED] IP
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 07 Nov 2008 19:06:30 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 291
>
> v=0
> o=root 21520 21520 IN IP4 151.196.61.115
> s=session
> c=IN IP4 <public IP>
> t=0 0
> m=audio 11968 RTP/AVP 0 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> -- Called bw_outbound/+18885551212
> FreePBX*CLI>
> <--- SIP read from 216.82.224.202:5060 --->
> SIP/2.0 100 Giving a try
> Via: SIP/2.0/UDP public IP:5060;branch=z9hG4bK6ea30a1a;rport=5060
> From: "8881231234" <sip:[EMAIL PROTECTED] IP>;tag=as3ed791f3
> To: <sip:[EMAIL PROTECTED]>
> Call-ID: [EMAIL PROTECTED] IP
> CSeq: 102 INVITE
> Server: Bandwidth.com TRM (bw7.gold.13)
> Content-Length: 0
>
> <------------->
> --- (8 headers 0 lines) ---
> FreePBX*CLI>
> <--- SIP read from 216.82.224.202:5060 --->
> SIP/2.0 183 Session Progress
> Via: SIP/2.0/UDP public IP:5060;branch=z9hG4bK6ea30a1a;rport=5060
> Record-Route: <sip:216.82.224.202;lr;ftag=as3ed791f3>
> From: "8881231234" <sip:[EMAIL PROTECTED] IP>;tag=as3ed791f3
> To: <sip:[EMAIL PROTECTED]>;tag=VPST50603522629853
> Call-ID: [EMAIL PROTECTED] IP
> CSeq: 102 INVITE
> Contact: <sip:[EMAIL PROTECTED]:5060;transport=udp>
> Content-Type: application/sdp
> Content-Length: 184
>
> v=0
> o=- 1226084867 1226084868 IN IP4 209.244.42.253
> s=-
> c=IN IP4 209.244.42.253
> t=0 0
> m=audio 64706 RTP/AVP 0 101
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=ptime:20
>
> <------------->
> --- (10 headers 9 lines) ---
> Found RTP audio format 0
> Found RTP audio format 101
> Peer audio RTP is at port 209.244.42.253:64706
> Found audio description format telephone-event for ID 101
> Got unsupported a:fmtp in SDP offer
> Capabilities: us - 0x104 (ulaw|g729), 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 209.244.42.253:64706
> -- SIP/bw_outbound-08bf43d0 is making progress passing it to
> SIP/203-b7a2b558
> Audio is at public IP port 16244
> Adding codec 0x4 (ulaw) to SDP
> Adding codec 0x100 (g729) to SDP
> Adding non-codec 0x1 (telephone-event) to SDP
>
> <--- Transmitting (NAT) to 172.16.2.203:5060 --->
> SIP/2.0 183 Session Progress
> Via: SIP/2.0/UDP
> 172.16.2.203;branch=z9hG4bKed293df65EAFD78F;received=172.16.2.203
> From: "Me" <sip:[EMAIL PROTECTED] IP>;tag=28354B-27A53F00
> To: <sip:[EMAIL PROTECTED] IP;user=phone>;tag=as600b952c
> Call-ID: [EMAIL PROTECTED]
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Contact: <sip:[EMAIL PROTECTED] IP>
> Content-Type: application/sdp
> Content-Length: 291
>
> v=0
> o=root 21520 21520 IN IP4 public IP
> s=session
> c=IN IP4 public IP
> t=0 0
> m=audio 16244 RTP/AVP 0 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
>
> <------------->
> --- (10 headers 9 lines) ---
> Found RTP audio format 0
> Found RTP audio format 101
> Peer audio RTP is at port 209.244.42.253:64706
> Found audio description format telephone-event for ID 101
> Got unsupported a:fmtp in SDP offer
> Capabilities: us - 0x104 (ulaw|g729), 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 209.244.42.253:64706
> list_route: hop: <sip:216.82.224.202;lr;ftag=as3ed791f3>
> set_destination: Parsing <sip:216.82.224.202;lr;ftag=as3ed791f3> for
> address/port to send to
> set_destination: set destination to 216.82.224.202, port 5060
> Transmitting (no NAT) to 216.82.224.202:5060:
> ACK sip:[EMAIL PROTECTED]:5060;transport=udp SIP/2.0
> Via: SIP/2.0/UDP public IP:5060;branch=z9hG4bK3c4f465e;rport
> Route: <sip:216.82.224.202;lr;ftag=as3ed791f3>
> From: "8881231234" <sip:[EMAIL PROTECTED] IP>;tag=as3ed791f3
> To: <sip:[EMAIL PROTECTED]>;tag=VPST50603522629853
> Contact: <sip:[EMAIL PROTECTED] IP>
> Call-ID: [EMAIL PROTECTED] IP
> CSeq: 102 ACK
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Content-Length: 0
>
>
> ---
> -- SIP/bw_outbound-08bf43d0 answered SIP/203-b7a2b558
> Audio is at public IP port 16244
> Adding codec 0x4 (ulaw) to SDP
> Adding codec 0x100 (g729) to SDP
> Adding non-codec 0x1 (telephone-event) to SDP
>
> <--- Reliably Transmitting (NAT) to 172.16.2.203:5060 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 172.16.2.203;branch=z9hG4bKed293df65EAFD78F;received=172.16.2.203
> From: "Me" <sip:[EMAIL PROTECTED] IP>;tag=28354B-27A53F00
> To: <sip:[EMAIL PROTECTED] IP;user=phone>;tag=as600b952c
> Call-ID: [EMAIL PROTECTED]
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Contact: <sip:[EMAIL PROTECTED] IP>
> Content-Type: application/sdp
> Content-Length: 291
>
> v=0
> o=root 21520 21521 IN IP4 public IP
> s=session
> c=IN IP4 public IP
> t=0 0
> m=audio 16244 RTP/AVP 0 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> <------------>
> -- Packet2Packet bridging SIP/203-b7a2b558 and SIP/bw_outbound-08bf43d0
> Retransmitting #1 (NAT) to 172.16.2.203:5060:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 172.16.2.203;branch=z9hG4bKed293df65EAFD78F;received=172.16.2.203
> From: "Me" <sip:[EMAIL PROTECTED] IP>;tag=28354B-27A53F00
> To: <sip:[EMAIL PROTECTED] IP;user=phone>;tag=as600b952c
> Call-ID: [EMAIL PROTECTED]
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Contact: <sip:[EMAIL PROTECTED] IP>
> Content-Type: application/sdp
> Content-Length: 291
>
> v=0
> o=root 21520 21521 IN IP4 public IP
> s=session
> c=IN IP4 public IP
> t=0 0
> m=audio 16244 RTP/AVP 0 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> <------------->
> --- (10 headers 0 lines) ---
> Really destroying SIP dialog '[EMAIL PROTECTED]
> IP' Method: OPTIONS
> Retransmitting #2 (NAT) to 172.16.2.203:5060:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 172.16.2.203;branch=z9hG4bKed293df65EAFD78F;received=172.16.2.203
> From: "Me" <sip:[EMAIL PROTECTED] IP>;tag=28354B-27A53F00
> To: <sip:[EMAIL PROTECTED] IP;user=phone>;tag=as600b952c
> Call-ID: [EMAIL PROTECTED]
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Contact: <sip:[EMAIL PROTECTED] IP>
> Content-Type: application/sdp
> Content-Length: 291
>
> v=0
> o=root 21520 21521 IN IP4 public IP
> s=session
> c=IN IP4 public IP
> t=0 0
> m=audio 16244 RTP/AVP 0 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
> ---
> <snip>
> <Then this and call is dropped>
> ---
> Scheduling destruction of SIP dialog
> '[EMAIL PROTECTED] IP' in 32000 ms (Method:
> INVITE)
> set_destination: Parsing <sip:216.82.224.202;lr;ftag=as3ed791f3> for
> address/port to send to
> set_destination: set destination to 216.82.224.202, port 5060
> Reliably Transmitting (no NAT) to 216.82.224.202:5060:
> BYE sip:[EMAIL PROTECTED]:5060;transport=udp SIP/2.0
> Via: SIP/2.0/UDP public IP:5060;branch=z9hG4bK5e8d995d;rport
> Route: <sip:216.82.224.202;lr;ftag=as3ed791f3>
> From: "8881231234" <sip:[EMAIL PROTECTED] IP>;tag=as3ed791f3
> To: <sip:[EMAIL PROTECTED]>;tag=VPST50603522629853
> Call-ID: [EMAIL PROTECTED] IP
> CSeq: 103 BYE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Content-Length: 0
> --------------END---------------
>
> Doesn't matter if I have my SIP phone setting as nat=yes or nat=no.
>
> Settings:
>
> Outbound to Bandwidth.com: nat=no
> Inbound from Bandwidth.com: nat=no
> <Tried nat=yes on 1 and both. No effect>
>
> SIP Phone:
> nat=yes <doesn't matter if it's nat=no>
> qualify=yes
>
> SonicWall stuff I can't really post, but if you ask about it, I can
> answer. Basically, we have an interface that's the phone system that
> is assigned a static IP. SIP transformation is on and consistent NAT
> is off under VOIP settings. The phone interface has VOIP/SIP allowed
> and just blocks intrusion attempts.
>
> Question: Why does it sometimes work and sometimes not? This makes no
> sense and it happens on all phones. Any suggestions?
>
>
>
We see this on occasion. It sounds a lot like Asterisk doing its usual
routine of deciding that you can't POSSIBLY have a call going through
because it can't receive an ACK response properly. Asterisk tries
several times to send an ACK and get a response. If the remote system
routes ACKs differently than it routes everything else, often times
those ACKs get lost, and Asterisk assumes that the call can't be
working, so it destroys it.
ACK handling is a bit tricky in the real world, and we've run across
countless incorrectly-configured SIP servers that don't handle it
properly, so calls to them last just about exactly 30 seconds and then
drop.
There is, unfortunately, no way to turn off Asterisk's 'intelligent'
behaviour in this scenario short of possibly patching the code.
N.
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users