Auto hangup channels where no sound detected after several time

Hello, i am a newbie in asterisk. What i am trying to do is to make the auto hangup for the channel during the call process, the sound is not detected for some time. So far i tried using TALK_DETECT but still not auto hangup. Anybody can help me ?

[group]
exten => s,1,Set(TALK_DETECT(set)=)
same => n,Monitor()
switch => Realtime/group@realtime_ext
exten => s,n,Hangup()

Why just dont use the option rtptimeout=x Terminate call if x seconds of no RTP or RTCP activity

I have already tried using it, but still the channels exist because rtp still transmitted. What I want is a hangup when no sound is being transmitted, like muting the audio.

The TALK_DETECT dialplan function just provides events that tell you talking/not talking over AMI and ARI. There is nothing built in that I’m aware of to automatically hang up when there’s silence for a period of time. You could write something using AMI to do it, provided it kept track of channels and silence times.

1 Like

It solved by adding the TALK DETECT function with priority number upper than Dial function in database, and the even ger through ARI. Thank @jcolp for the help