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
