[Asterisk-Users] Re: WaitExten question

snacktime snacktime at gmail.com
Fri Mar 25 15:08:51 MST 2005


On Fri, 25 Mar 2005 13:40:57 -0800, snacktime <snacktime at gmail.com> wrote:
> I'm a bit confused about how WaitExten works.  I assumed that when it
> returns 0, the next priority in the extension would be executed, but
> that doesn't seem to be the case.   When I get to WaitExten and enter
> extension 8, it plays the message, then Waits another 10 seconds and
> times out.
> 
> [local]
> exten => s,1,Wait,1                     ; Wait a second, just for fun
> exten => s,2,Answer                     ; Answer the line
> exten => s,3,DigitTimeout,5             ; Set Digit Timeout to 5 seconds
> exten => s,4,BackGround(thank-you-for-calling)  ; Play a congratulatory message
> exten => s,5,Playback(enter-ext-of-person)
> exten => s,6,WaitExten(10)
> exten => s,7,Playback(goodbye)
> exten => s,9,Hangup
> 
> exten => 1000,1,Goto(local,s,1)
> exten => 8,1,Playback(/tmp/test)          ; "test message"
> 
> exten => #,1,Playback(goodbye)              ; "Thanks for trying the demo"
> exten => #,2,Hangup                     ; Hang them up.
> exten => t,1,Goto(#,1)                  ; If they take too long, give up
> exten => i,1,Playback(invalid)          ; "That's not valid, try again"
> 
> Also, I'm confused about this line in the wiki regarding WaitExten.
> Specifically what is mean't by 'stack' and 'restarts the current
> context'.  I'm guessing stack means the digits WaitExten has read from
> the caller.  I would think that restarting the current context would
> mean it jump back up to s,1, but it doesn't.  It just resumes at s,6.
> 
> Chris
> 

Oops, here is the line I was talking about in the wiki...

"This command is particularly interesting as it pushes the received
extension back on to the stack and then restarts the current context.
"



More information about the asterisk-users mailing list