[Asterisk-Users] The sounds of silence: silent soundfiles available

Steven Critchfield critch at basesys.com
Fri Sep 5 00:14:18 MST 2003


On Fri, 2003-09-05 at 01:40, John Todd wrote:

> [nonpedanticexample]
> exten => s,1,DigitTimeout(5)
> exten => s,2,ResponseTimeout(20)
> exten => s,3,Background(type-your-selection)
> exten => s,4,Background(silence/3)
> exten => s,5,Background(type-your-selection)
> exten => s,6,Background(silence/3)
> exten => s,7,Background(if-you-need-help-press-pound-for-instructions)
> 
> exten => t,1,Goto(s,3)


This is another way. Please think about limiting your loops like I have
below. It is possible to get a channel that didn't detect a hangup, and
would stay busy the way you have listed above. 

[anotherway]
exten => s,1,SetVar(Loop=0)
exten => s,2,DigitTimeout(5)
exten => s,3,ResponseTimeout(20)
exten => s,4,Background(type-your-selection)


exten => t,1,SetVar(Loop=[${Loop}+1])
exten => t,2,gotoif([${Loop} > 6]?t|100)
exten => t,3,gotoif([${Loop} == 3]?t|200)
exten => t,4,goto(s|3)

exten => t,100,Hangup

exten => t,200,Background(if-you-need-help-press-pound-for-instructions)
exten => t,201,goto(s|3)



-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list