[Home]

Summary:ASTERISK-01941: app_disa does not handle near end hangup
Reporter:Matthew Simpson (matthewsimpson)Labels:
Date Opened:2004-07-02 19:38:49Date Closed:2011-06-07 14:10:18
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:App_disa does not handle a near end hangup properly.

Scenario: User calls into DISA application and gets dialtone. User inputs phone number.  DISA rings phone number.  If user hangs up before DISA completes the call, DISA does not detect near end hangup quickly.  

If user is calling PSTN, this means PSTN far end will hear dead air if call is answered.
Comments:By: Brian West (bkw918) 2004-07-02 22:02:06

I can't recreate this.  What hardware are you using?

By: Matthew Simpson (matthewsimpson) 2004-07-03 10:39:44

I'm using CVS july 1 2004 1:00am.

I have a PSTN DID from ipkall.com that forwards to my SIP gateway, extension 1010 [the AGI script that checks the caller ID to authenticate, then if it passes, sends the call to extension 1011 which spawns DISA].
 
I also have a Grandstream BT101 on my SIP network.  I just checked and if I use the Grandstream, it works properly.

If I use the PSTN DID, it does not.  The problem is either in Ipkall's gateway, or in asterisk's handling of Ipkall's gateway.

Here is the SIP DEBUG from start to finish:

Sip read:
INVITE sip:1010@sip.txlink.net SIP/2.0
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>
Contact: <sip:9726172877@66.54.140.46>
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Sat, 03 Jul 2004 15:16:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 263

v=0
o=root 17490 17490 IN IP4 66.54.140.46
s=session
c=IN IP4 66.54.140.46
t=0 0
m=audio 17356 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

12 headers, 12 lines
Using latest request as basis request
Sending to 66.54.140.46 : 5060 (non-NAT)
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Peer RTP is at port 66.54.140.46:0
Found description format GSM
Found description format PCMU
Found description format PCMA
Found description format telephone-event
Capabilities: us - 0x4(ULAW), peer - audio=0xe(GSM|ULAW|ALAW)/video=0x0(EMPTY), combined - 0x4(ULAW)
Non-codec capabilities: us - 0x1(G723), peer - 0x1(G723), combined - 0x1(G723)
Found no matching peer or user for '66.54.140.46:5060'
Looking for 1010 in from-sip
list_route: hop: <sip:9726172877@66.54.140.46>
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.224.13:0>
Content-Length: 0


to 66.54.140.46:5060
   -- Executing AGI("SIP/66.54.140.46-407188d0", "ldusers.agi") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/ldusers.agi
We're at 67.137.200.13 port 16044
Answering with preferred capability 0x4(ULAW)
Answering with non-codec capability 0x1(G723)
Reliably Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.224.13:0>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.200.13
s=session
c=IN IP4 67.137.224.13
t=0 0
m=audio 16044 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 66.54.140.46:5060
 ldusers.agi: SELECT active FROM cids WHERE cid='9726172877'
   -- AGI Script ldusers.agi completed, returning 0
   -- Executing DISA("SIP/66.54.140.46-407188d0", "no-password|disa") in new stack
Retransmitting #1 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.200.13:0>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.200.13
s=session
c=IN IP4 67.137.200.13
t=0 0
m=audio 16044 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 66.54.140.46:5060
Retransmitting #2 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.224.13:0>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.200.13
s=session
c=IN IP4 67.137.200.13
t=0 0
m=audio 16044 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 66.54.140.46:5060
Retransmitting #3 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.200.13:0>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.224.13
s=session
c=IN IP4 67.137.200.13
t=0 0
m=audio 16044 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 66.54.140.46:5060
Retransmitting #4 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.200.13:0>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.200.13
s=session
c=IN IP4 67.137.200.13
t=0 0
m=audio 16044 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 66.54.140.46:5060
   -- Executing Dial("SIP/66.54.140.46-407188d0", "SIP/19726172877@66.243.109.99") in new stack
We're at 67.137.200.13 port 17128
Answering/Requesting with root capability 4
Answering with non-codec capability 0x1(G723)
12 headers, 10 lines
Reliably Transmitting:
INVITE sip:19726172877@66.243.109.99 SIP/2.0
Via: SIP/2.0/UDP 67.137.200.13:0;branch=z9hG4bK2452e12a
From: "9726172877" <sip:9726172877@67.137.224.13:0>;tag=as2cd1afc3
To: <sip:19726172877@66.243.109.99>
Contact: <sip:9726172877@67.137.200.13:0>
Call-ID: 275adb0933764f147ef7329a16ff12d2@67.137.200.13
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Sat, 03 Jul 2004 15:19:28 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.200.13
s=session
c=IN IP4 67.137.200.13
t=0 0
m=audio 17128 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
(no NAT) to 66.243.109.99:5060
   -- Called 19726172877@66.243.109.99
ns3*CLI>

Sip read:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 67.137.200.13:0;branch=z9hG4bK2452e12a
From: "9726172877" <sip:9726172877@67.137.200.13:0>;tag=as2cd1afc3
To: <sip:19726172877@66.243.109.99>
Call-ID: 275adb0933764f147ef7329a16ff12d2@67.137.200.13
CSeq: 102 INVITE
Content-Length: 0


7 headers, 0 lines
Retransmitting ASTERISK-1 (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.54.140.46:5060;branch=z9hG4bK08162b65
From: "9726172877" <sip:9726172877@66.54.140.46>;tag=as024c442f
To: <sip:1010@sip.txlink.net>;tag=as1e87b330
Call-ID: 7d3606c932baa5e81acaf4c621b89e32@66.54.140.46
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1010@67.137.200.13:0>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6291 6291 IN IP4 67.137.200.13
s=session
c=IN IP4 67.137.200.13
t=0 0
m=audio 16044 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

to 66.54.140.46:5060
ns3*CLI>

Sip read:

0 headers, 0 lines
ns3*CLI>

Sip read:
SIP/2.0 183 Session Progress
To: <sip:19726172877@66.243.109.99>;tag=3297856485-640703
From: "9726172877" <sip:9726172877@67.137.200.13>;tag=as2cd1afc3
Call-ID: 275adb0933764f147ef7329a16ff12d2@67.137.200.13
CSeq: 102 INVITE
Contact: sip:19726172877@66.243.109.99:5060
Content-Type: application/sdp
Via: SIP/2.0/UDP 67.137.200.13:0;branch=z9hG4bK2452e12a
Content-Length: 196

v=0
o=NexTone-MSW 1234 670 IN IP4 66.147.170.37
s=sip call
c=IN IP4 66.147.170.37
t=0 0
m=audio 19104 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

9 headers, 9 lines
Found RTP audio format 0
Found RTP audio format 101
Peer RTP is at port 66.147.170.37:0
Found description format PCMU
Found description format telephone-event
Capabilities: us - 0x4(ULAW), peer - audio=0x4(ULAW)/video=0x0(EMPTY), combined - 0x4(ULAW)
Non-codec capabilities: us - 0x1(G723), peer - 0x1(G723), combined - 0x1(G723)
   -- SIP/66.243.109.99-a473 is making progress passing it to SIP/66.54.140.46-407188d0
ns3*CLI> sip no debug
SIP Debugging Disabled
   -- SIP/66.243.109.99-a473 answered SIP/66.54.140.46-407188d0
   -- Attempting native bridge of SIP/66.54.140.46-407188d0 and SIP/66.243.109.99-a473
 == Spawn extension (disa, 9726172877, 1) exited non-zero on 'SIP/66.54.140.46-407188d0'
ns3*CLI>

By: Mark Spencer (markster) 2004-07-03 18:56:42

There is no BYE, there isn't even an ACK.  There is a bug here, because we're not seeing an ACK coming back, but i see nothing to suggest it's Asterisk's fault, unless your provider has some reason to think that it is.

By: Malcolm Davenport (mdavenport) 2004-07-08 15:38:13

Any updates, or is this one going to get closed?

By: Matthew Simpson (matthewsimpson) 2004-07-08 16:08:44

I am going to test with another provider and see if I can duplicate.  Will advise.

By: twisted (twisted) 2004-07-13 13:23:30

Any updates here?

By: Matthew Simpson (matthewsimpson) 2004-07-13 13:58:35

It works properly with the other provider (broadvox) and with SIP local devices, so the blame should be placed on ipkall instead of Asterisk.

By: twisted (twisted) 2004-07-13 14:01:57

Allrighty then.  I'm closing this out.