[Home]

Summary:ASTERISK-00383: [request] Channel silence detection and hangup
Reporter:John Todd (jtodd)Labels:
Date Opened:2003-10-13 22:27:29Date Closed:2004-09-25 02:57:07
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:It may be useful to detect silence on a channel, and disconnect that channel if there is an unusually long period of silence on the line.  This should be selectable in the Dial statement, but could apply to all channel types in order to prevent zombies from living forever.

Example: Often it is the case that SIP calls will get disconnected due to a network outage or other non-state-changing event.  If a BYE is not received, then a connection will stay open indefinately.  While rare, it is possible that a connection will never die until Asterisk is re-started or an AbsoluteTimeout is reached.

It seems that for those calls that pass through Asterisk, it is possible to determine if they have fallen into this state.  As we can "see" the audio channels in both directions, a useful tool addition might be to allow us to set some sort of "silence detection" on those SIP channels so we can hang them up.

I propose an additional option flag on Dial, called "s" for "silence detect".  If the s is followed by a number, the number should be the number of seconds to allow for silence to exist on that leg before a hangup is imposed.  Default is 60 seconds.  If the call is a SIP call or IAX call, the call is not transferred nor is media released through to the remote destination (just like T and t options for Dial)

s = remote leg
S = local leg that is executing the Dial statement

Examples:

; simple hangup if 60 seconds of silence is detected on either end of a conversation
exten => 1234,1,Dial(SIP/1234,sS)

; If 120 seconds of silence is detected on the SIP leg, hang up
exten => 1234,1,Dial(SIP/1234,s120)

; if 120 seconds of silence is detected on the calling party leg OR 60 seconds of silence on the SIP leg, hang up
exten => 1234,1,Dial(SIP/1234,S120)
Comments:By: jrollyson (jrollyson) 2004-01-27 23:42:59.000-0600

Silence detection is not a solution, see the discussion in ASTERISK-204 - the proper solution is SIP session timers, which offer a clean way to detect the failure of a SIP endpoint without relying on the content of the RTP stream (which may be muted) as an indication.