Summary:ASTERISK-15491: [patch] channels stuck in ringing state forever
Reporter:under (under)Labels:
Date Opened:2010-01-22 11:13:05.000-0600Date Closed:2011-06-07 14:08:18
Versions:Frequency of
Environment:Attachments:( 0) ringing_timeout.diff
( 1) uas.xml
CALLER -> INVITE            ->  ASTERISK -> INVITE            -> CALLEE
CALLER <- RINGING           <-  ASTERISK <- RINGING           -> CALLEE

After this short network out of order causes further packets lost and channels are stuck in "show channels" forever.

Caller and callee gateways seem to hangup channel by retransmission timeout, so they are clean and tidy.

You can reproduce this with attached sipp scenario being run on callee side.
It simply doesn't response anything after Ringing - you'll see channels stuck.


Version is 1.4.21 and I have no time to test with the newer one.
Looking into code it's all the same in the newer versions.
Comments:By: under (under) 2010-01-22 11:23:34.000-0600

Attached sipp script that sleeps for 2 minutes after Ringing.
And asterisk doesn't drop the channel for any timeout.

By: under (under) 2010-01-22 11:33:44.000-0600

Attached patch for 1.4 trunk (r242234).
I didn't find any info regarding this issue in RFC3261, so I invented my own timeout of 1 minute. I guess this should be done configurable.

By: under (under) 2010-01-26 04:51:17.000-0600

Issue can be workaround'ed using Dial's timeout option (it controls the amount of time connection procedure can take).
But anyway, some mechanism is needed to control timeouts of SIP messages, that is independent from Dial.
And my patch seems to be only a workaround - some more thorough implementation is needed.

By: David Vossel (dvossel) 2010-02-26 10:44:40.000-0600

In 1.6.0, does the timerb option do what you are wanting?

;--------------------------- SIP timers ----------------------------------------------------
; These timers are used primarily in INVITE transactions.
; The default for Timer T1 is 500 ms or the measured run-trip time between
; Asterisk and the device if you have qualify=yes for the device.
;t1min=100                      ; Minimum roundtrip time for messages to monitored hosts
                               ; Defaults to 100 ms
;timert1=500                    ; Default T1 timer
                               ; Defaults to 500 ms or the measured round-trip
                               ; time to a peer (qualify=yes).
;timerb=32000                   ; Call setup timer. If a provisional response is not received
                               ; in this amount of time, the call will autocongest
                               ; Defaults to 64*timert1

By: under (under) 2010-03-29 08:03:50

yeah, it seems to be the solution