[Asterisk-Users] timed Loop

Eric Wieling aka ManxPower eric at fnords.org
Mon Apr 11 12:46:24 MST 2005


Race Vanderdecken wrote:
> This might seem really dumb but tack enough silence onto the back of
> your file to make it five minutes long. Then the message play for 5
> minutes and repeats.
> 
> 
> Race "The Tyrant" Vanderdecken
> This was a dumb idea.
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris
> Sent: Monday, April 11, 2005 11:26 AM
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] timed Loop
> 
>     I need to make a time loop in the Extensions.conf.   I want it to
> play a file every 5 minutes on a call.   If I can't use wait because it
> ignores all audio.   Anyone have any suggestions?

[auto-attendent]
;
; Auto Attendent
;
exten => s,1,SetVar(SAVED_CONTEXT=incoming)
exten => s,2,SetVar(COUNT=1)
exten => s,3,Answer
exten => s,4,DigitTimeout(5)
exten => s,5,ResponseTimeout(7)
exten => s,6,Wait(.5)
exten => s,7,Background(if-u-know-ext-dial)
exten => s,8,Background(company-dir-411)

exten => 411,1,Goto(extensions,2110,1)

exten => 0,1,Playback(pls-wait-connect-call)
exten => 0,2,Goto(extensions,2100,1)

exten => t,1,GotoIf($[${COUNT} = 3]?exit,1)
exten => t,2,SetVar(COUNT=$[${COUNT} + 1])
exten => t,3,Goto(s,7)

exten => i,1,GotoIf($[${COUNT} = 3]?exit,1)
exten => i,2,SetVar(COUNT=$[${COUNT} + 1])
exten => i,3,Playback(extension)
exten => i,4,SayDigits(${INVALID_EXTEN})
exten => i,5,Wait(.5)
exten => i,6,Playback(pbx-invalid)
exten => i,7,Goto(s,6)

exten => exit,1,Playback(goodbye)
exten => exit,2,Wait(3)
exten => exit,3,Hangup

include => extensions



More information about the asterisk-users mailing list