[Home]

Summary:ASTERISK-01711: SIP channels not hanging up
Reporter:tan (tan)Labels:
Date Opened:2004-05-27 13:13:43Date Closed:2004-09-25 02:43:33
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:We use asterisk as a call gateway, for terminating sip and iax originated calls across the pstn. We have had a number of situations recently where a sip subscriber hangs up the phone on his side, but the call is still connected. The call only disconnects when the caller runs out of credit.


****** ADDITIONAL INFORMATION ******

I am logging this as a bug and need information on how to determine where the problem lies. Surely if an rtp stream no longer exists from the phone to our gateway then the call should disconnect? We are using the latest cvs.
Comments:By: Brian West (bkw918) 2004-05-27 13:55:15

please enable sip history at the cli

"sip history"

Then we can get a history of any hung sip channel.

bkw

By: tan (tan) 2004-05-27 15:00:12

The sip history only shows the history for the current active channels. We only realise that a channel hasn't hung up when we look at the logs and the user has spent all his credit. Therefore we can never get the history. Please could you suggest how else we can diagnose what the problem is.

By: Diego Ercolani (dercol) 2004-05-27 16:33:56

I've another kind of problem but is related to this (I think). I've tryied CVSs
from 1 week until now and I've found that SIP with GrandStream BT 100 doesn't work completely:

Calling from BT to echo test:
*CLI> sip history
SIP History Recording Enabled (use 'sip show history')
   -- Executing Wait("SIP/gs1-9d91", "1") in new stack
   -- Executing Answer("SIP/gs1-9d91", "") in new stack
   -- Executing SayDigits("SIP/gs1-9d91", "20") in new stack
   -- Playing 'digits/2' (language 'it')
   -- Playing 'digits/0' (language 'it')
   -- Executing Echo("SIP/gs1-9d91", "") in new stack

*CLI> sip May 27 22:21:05 WARNING[278546]: chan_sip.c:603 retrans_pkt: Maximum retries exceeded on call 19e28fb26beaad62@192.168.1.184 for seqno 35710 (Non-critical Response)
show history
Usage: sip show history <channel>
      Provides detailed dialog history on a given SIP channel.
*CLI> sip show history 19e28fb26beaad62@192.168.1.184

 * SIP Call
1. Rx              INVITE sip:500@asterisk.cantina.yacme SIP/2.0
2. CancelDestroy
3. TxRespRel       SIP/2.0 407 Proxy Authentication Required
4. SchedDestroy    15000 ms
5. Rx              ACK sip:500@asterisk.cantina.yacme SIP/2.0
6. Rx              INVITE sip:500@asterisk.cantina.yacme SIP/2.0
7. CancelDestroy
8. CancelDestroy
9. TxResp          SIP/2.0 100 Trying
10. TxRespRel       SIP/2.0 200 OK
11. ReTx            SIP/2.0 200 OK
12. ReTx            SIP/2.0 200 OK
13. ReTx            SIP/2.0 200 OK
14. ReTx            SIP/2.0 200 OK
15. ReTx            SIP/2.0 200 OK
16. MaxRetries      (Non-critical)
*CLI>

<----------- here I hangup Budgetone ------------>
*CLI> sip show history 19e28fb26beaad62@192.168.1.184

 * SIP Call
1. Rx              INVITE sip:500@asterisk.cantina.yacme SIP/2.0
2. CancelDestroy
3. TxRespRel       SIP/2.0 407 Proxy Authentication Required
4. SchedDestroy    15000 ms
5. Rx              ACK sip:500@asterisk.cantina.yacme SIP/2.0
6. Rx              INVITE sip:500@asterisk.cantina.yacme SIP/2.0
7. CancelDestroy
8. CancelDestroy
9. TxResp          SIP/2.0 100 Trying
10. TxRespRel       SIP/2.0 200 OK
11. ReTx            SIP/2.0 200 OK
12. ReTx            SIP/2.0 200 OK
13. ReTx            SIP/2.0 200 OK
14. ReTx            SIP/2.0 200 OK
15. ReTx            SIP/2.0 200 OK
16. MaxRetries      (Non-critical)
*CLI> soft hangup SIP/gs1-9d91
Requested Hangup on channel 'SIP/gs1-9d91'
 == Spawn extension (FXO, 500, 4) exited non-zero on 'SIP/gs1-9d91'
   -- Executing Hangup("SIP/gs1-9d91", "") in new stack
 == Spawn extension (FXO, h, 1) exited non-zero on 'SIP/gs1-9d91'

Issues:
1. grandstream doesn't hang up channel
2. it isn't possible to ear nothing

==============
second case
==============
Call from MGCP -> SIP

*CLI>
*CLI>
   -- Endpoint 'chan0@192.168.1.151-1' observed 'hd'
   -- MGCP mgcp_new(MGCP/chan0@192.168.1.151-1) created in state: Down
   -- Endpoint 'chan0@192.168.1.151-1' observed '2'
   -- Endpoint 'chan0@192.168.1.151-1' observed '0'
   -- Executing NoOp("MGCP/chan0@192.168.1.151-1", "") in new stack
   -- Executing NoOp("MGCP/chan0@192.168.1.151-1", "") in new stack
   -- Executing Dial("MGCP/chan0@192.168.1.151-1", "SIP/gs1|70|rt") in new stack
   -- Called gs1
   -- Got SIP response 404 "Not Found" back from 192.168.1.104
   -- SIP/gs1-0d9f is ringing <--- correctly ringing
   -- SIP/gs1-0d9f answered MGCP/chan0@192.168.1.151-1 <--- correctly answered
<---- nothing ear, nothing spoken ---->
   -- MGCP mgcp_answer(MGCP/chan0@192.168.1.151-1) on chan0@192.168.1.151-1
   -- Attempting native bridge of MGCP/chan0@192.168.1.151-1 and SIP/gs1-0d9f
   -- Attempting native bridge of MGCP/chan0@192.168.1.151-1 and SIP/gs1-0d9f

*CLI>
*CLI> sip show history 201678af0b400ecd5bdd476050143e98@81.208.26.126

 * SIP Call
1. TxReqRel        INVITE sip:gs1@192.168.1.184 SIP/2.0
2. Rx              SIP/2.0 100 trying
3. CancelDestroy
4. Rx              SIP/2.0 180 ringing
5. CancelDestroy
6. Rx              SIP/2.0 200 OK
7. CancelDestroy
8. TxReq           ACK sip:gs1@192.168.1.184 SIP/2.0
*CLI>
*CLI>
<---- I've hung up SIP GT Phone ---->
*CLI>
*CLI> sip show history 201678af0b400ecd5bdd476050143e98@81.208.26.126

 * SIP Call
1. TxReqRel        INVITE sip:gs1@192.168.1.184 SIP/2.0
2. Rx              SIP/2.0 100 trying
3. CancelDestroy
4. Rx              SIP/2.0 180 ringing
5. CancelDestroy
6. Rx              SIP/2.0 200 OK
7. CancelDestroy
8. TxReq           ACK sip:gs1@192.168.1.184 SIP/2.0
*CLI>
*CLI>
   -- Endpoint 'chan0@192.168.1.151-1' observed 'hu' <--- correct, hung up MGCP
 == Spawn extension (FXO, 20, 3) exited non-zero on 'MGCP/chan0@192.168.1.151-1'
   -- Executing Hangup("MGCP/chan0@192.168.1.151-1", "") in new stack
 == Spawn extension (FXO, h, 1) exited non-zero on 'MGCP/chan0@192.168.1.151-1'
   -- Got SIP response 481 "no such call" back from 192.168.1.184

*CLI>
*CLI>
*CLI>


Two end notes:
1. Firmware 1.0.4.68 that work with middle april CVS (that I use normally)
2. No problems with Zultys LipZ4 softphone

By: Diego Ercolani (dercol) 2004-05-27 16:39:51

Sorry, find issue:
was configuration:
-----> in old CVSs I could use
externip = 81.208.26.126       ; Address that we're going to put in SIP messages if we're behind a NAT
in sip.conf also in non NAT environment as I could use nat=no per phone basis.

I've only removed externip=[IPADDR] and then magically all seem to work.
A question:
----> how can I have a mixed SIP environment???

By: Mark Spencer (markster) 2004-05-27 18:06:41

This isn't a bug in Asterisk -- if BYE isn't received there is no way to know the call terminated within the bounds of RFC3261.

However, I've added an option called "rtptimeout" which can be used to automatically hangup the call if no RTP traffic is received within that number of seconds.  It can be specified globally or on a per-peer basis.  Please be aware that if your ata ignores our request to disable silence suppression (e.g. you have an ATA186) then this could cause it to terminate the call when one party is silent for that number of seconds.

Further, if the ATA or phone puts us on hold, then explicitly they are no longer sending RTP traffic, so the rtptimeout setting is ignored.  However, an alternative setting, rtpholdtimeout, can be specified (it SHOULD be greater than rtptimeout).  That places an ABSOLUTE TIMEOUT on how long we will allow ourselves to be placed on hold.

These aren't beautiful, but they're at least some sort of a work around for yet another architectural limitation of SIP.  As you may have already guessed, IAX does not have this problem.