[asterisk-users] IVR problem
Doug Crompton
doug at crompton.com
Fri Nov 3 17:25:16 MST 2006
Ok thanks... well my point was that numerous examples show NOT using
waitexten but rather just background with the appropriate timers set. So
in my example below s,6 and s,7 would be eliminated. This seems to not
work though. As soon as the backgrouond message is complete the plan exits
to nowhere rather than obey the timeout (t) plan. At least this is the way
the "book" says it should be.
Doug
On Fri, 3 Nov 2006, Bruce Reeves wrote:
> 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
>
"Those that sacrifice essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." -- Ben Franklin (1759)
****************************
* Doug Crompton *
* Richboro, PA 18954 *
* 215-431-6307 *
* *
* doug at crompton.com *
* http://www.crompton.com *
****************************
More information about the asterisk-users
mailing list