[asterisk-users] IVR problem

Bruce Reeves asterisk at nortex-networks.com
Fri Nov 3 16:34:59 MST 2006


I have a similar IVR and use WaitExten(5) to give 5 seconds for the
extension to be entered. I have not tried using the Timeout options so I am
not sure how they should affect your dialplan.

On 11/3/06, Doug Crompton <doug at crompton.com> wrote:
>
> Can anyone tell me why the following code snipet does not behave the way I
> would expect?
>
> The "background" audio files are gsm and play fine. Here is what happens.
> When the set-day-night context is called it plays the menu asking to
> select 0,1, or 2. It then immediately "falls through" and terminates never
> waiting for the selection. Doesn't the timeout function determine the
> length of time it waits regardless of the actual sound file length? I have
> tried lengthening the time to no avail. The line marked below "waitexten"
> was added to make it work. It does not have the same functionality though
> with this added. The code minus this line is textbook basic IVR
> as far as I can tell. Comments???
>
> Doug
>
> [set-day-night]
> exten => s,1,Answer
> exten => s,2,SetMusicOnHold(default)
> exten => s,3,Set(TIMEOUT(digit)=5)
> exten => s,4,Set(TIMEOUT(response)=10)
> exten => s,5,Background(doug/select-day-night)
> exten => s,6,waitexten  >>>> added line
> exten => s,7,hangup()
>
> exten => 0,1,SetGlobalVar(day-night=0)
> exten => 0,2,Playback(doug/day-night-mode-reset)
> exten => 0,3,Hangup()
>
> exten => 1,1,SetGlobalVar(day-night=1)
> exten => 1,2,Playback(doug/day-mode)
> exten => 1,3,Hangup()
>
> exten => 2,1,SetGlobalVar(day-night=2)
> exten => 2,2,Playback(doug/night-mode)
> exten => 2,3,Hangup()
>
> exten => t,1,Goto(#,1)         ; If they take too long, give up
> exten => i,1,Playback(invalid) ; "That's not valid, try again"
> exten => i,2,Hangup()
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Bruce
Nortex Networks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061103/d8f0eabf/attachment.htm


More information about the asterisk-users mailing list