[asterisk-dev] WAIT FOR DIGIT not working
Moises Silva
moises.silva at gmail.com
Thu Sep 14 07:05:33 MST 2006
I thin you are likely to be ignored here, since is not a asterisk
development question, but asterisk-users question. You will have
better look there :)
Hint: Use asterisk command agi debug to see what is asterisk doing
with what you send.
Regards
On 9/14/06, Joel Lansden <Joel at digitalparadise.net> wrote:
> Hello all,
>
> I have been trying to solve this problem for days, with no luck.
>
> When I run an AGI script from my extensions.conf, it seems no matter
> what I do, the "WAIT FOR DIGIT" 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 1.2.12.1.
>
> My script is simple:
> ------------------------------------------------------------------------
>
> #!/usr/bin/perl
>
> use POSIX;
>
> $| = 1;
>
> sub trim {
> my @out = @_;
> for (@out)
> {
> s/^\s+//;
> s/\s+$//;
> }
> return wantarray ? @out : $out[0];
> }
>
> while(<STDIN>) {
> chomp;
> last unless length($_);
> if (/^agi_(\w+)\:\s+(.*)$/) {
> $AGI{$1} = $2;
> }
> }
>
> print "EXEC Ringing\n";
> print "EXEC Wait 1\n";
> print "EXEC Answer\n";
> print "EXEC Festival 'Please enter the extension you want to call'\n";
> $target = "";
>
> print "WAIT FOR DIGIT 5000\n";
> $target .= <STDIN>;
> print "WAIT FOR DIGIT 5000\n";
> $target .= <STDIN>;
> print "WAIT FOR DIGIT 5000\n";
> $target .= <STDIN>;
>
> print STDERR "Result was $target\n";
> ------------------------------------------------------------------------
>
> That's all there is to it, but it won't work.
>
> Can anyone help?
> Thanks!!!
>
> ~Joel
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
More information about the asterisk-dev
mailing list