[asterisk-users] WaitForSilence Problems

Richard Lyman pchammer at dynx.net
Fri Jul 18 13:51:39 CDT 2008


Nicholas Blasgen wrote:
> Actually, I thought about it for a while.  What I want is something 
> that will allow me to restart the message if another sound is 
> detected.  Something like this:
>  
> exten => answermachine,1,Answer()
> exten => answermachine,n,WaitForSilence(1000,2)
> exten => answermachine,n,Background(message)
> exten => answermachine,n,GotoIf($[${BACKGROUND}=DETECTED]?replay:exit)
> exten => answermachine,n(replay),Playback(message)
> exten => answermachine,n(exit),Hangup()
>  
> But Background() is looking for a DTMF tone and doesn't even work the 
> way I described up there.  Is there a function that looks for any 
> significant sound (ie, a BEEEEP) that will return and not continue the 
> audio?
Maybe you wanted BackgroundDetect application.



More information about the asterisk-users mailing list