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