Hi .<br>I had the same problem but downloaded a test script and wait for digit worked.<br>the only visible difference is that I wat nos using strict,<br><br>so I am rewriting the AGI with <br><br>use strict;<br><br>Hope this help.
<br><br><br><div><span class="gmail_quote">On 9/14/06, <b class="gmail_sendername">Joel Lansden</b> <<a href="mailto:Joel@digitalparadise.net">Joel@digitalparadise.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font size="2">Hello all,<br>
<br>
I have been trying to solve this problem <span id="st" name="st" class="st">for</span> days, with no luck.<br>
<br>
When I run an AGI script from my extensions.conf, it seems no matter what I do, the "<span id="st" name="st" class="st">WAIT</span> <span id="st" name="st" class="st">FOR</span> <span id="st" name="st" class="st">DIGIT
</span>" command will not work. The system just flies past it without waiting a single millisecond, and of course my script crashes because it doesn't have the input it needs. I have run 3 different versions of Asterisk in the hopes of clearing this up, and presently am on
<a href="http://1.2.12.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">1.2.12.1</a>.<br>
<br>
My script is simple:<br>
------------------------------------------------------------------------<br>
<br>
#!/usr/bin/perl<br>
<br>
use POSIX;<br>
<br>
$| = 1;<br>
<br>
sub trim {<br>
my @out = @_;<br>
<span id="st" name="st" class="st">for</span> (@out)<br>
{<br>
s/^\s+//;<br>
s/\s+$//;<br>
}<br>
return wantarray ? @out : $out[0];<br>
}<br>
<br>
while(<STDIN>) {<br>
chomp;<br>
last unless length($_);<br>
if (/^agi_(\w+)\:\s+(.*)$/) {<br>
$AGI{$1} = $2;<br>
}<br>
}<br>
<br>
print "EXEC Ringing\n";<br>
print "EXEC <span id="st" name="st" class="st">Wait</span> 1\n";<br>
print "EXEC Answer\n";<br>
print "EXEC Festival 'Please enter the extension you want to call'\n";<br>
$target = "";<br>
<br>
print "<span id="st" name="st" class="st">WAIT</span> <span id="st" name="st" class="st">FOR</span> <span id="st" name="st" class="st">DIGIT</span> 5000\n";<br>
$target .= <STDIN>;<br>
print "<span id="st" name="st" class="st">WAIT</span> <span id="st" name="st" class="st">FOR</span> <span id="st" name="st" class="st">DIGIT</span> 5000\n";<br>
$target .= <STDIN>;<br>
print "<span id="st" name="st" class="st">WAIT</span> <span id="st" name="st" class="st">FOR</span> <span id="st" name="st" class="st">DIGIT</span> 5000\n";<br>
$target .= <STDIN>;<br>
<br>
print STDERR "Result was $target\n";<br>
------------------------------------------------------------------------<br>
<br>
That's all there is to it, but it won't work.<br>
<br>
Can anyone help?<br>
Thanks!!!<br>
<br>
~Joel<br>
<br>
</font>
</p>
</div>
<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://Easynews.com" target="_blank">Easynews.com</a> --<br><br>
asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Camilo Echeverry<br><br>Your life would be very empty if you had nothing to regret.