Camilo Echeverry
2007-Feb-13 09:14 UTC
[asterisk-users] AGI "GET DATA" and "WAIT FOR DIGIT" don't work
Hi. I'm trying to get digits form the user via agi something like this: this only should print result=asciicode but none of the functions even wait until timeout .. they just pass .. (after a nanosecond) the las print is always timeout. Any clue ..? my $callerid = $AGI{'callerid'} ; if($callerid !~ /[0-9]{7,20}/){ #way numbre one print "EXEC PLAYBACK please_enter_your_number \"\"\n"; my $result <STDIN>; print "WAIT FOR DIGIT 3000\n"; my $result = <STDIN>; # Way number two # print "GET DATA please_enter_your_number \"-1\" \"10\""; my $result <STDIN>; } print STDERR "$result"; -- Camilo Echeverry Your life would be very empty if you had nothing to regret. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070213/f4424eed/attachment.htm
J. Espinal
2007-Feb-13 11:11 UTC
[asterisk-users] AGI "GET DATA" and "WAIT FOR DIGIT" don't work
I have experienced similar problems with AGI some time ago... sometimes, the script just get to the 'WAIT FOR DIGIT' function and the streamed audio file before it is a little 'long' and the timeout runs while you are still listening the audio... Try testing with a very large timeout number, let us say... 10 seconds... , that will get u some clue of the problem, If the timeout still gets too fast then the function is not working as spected (i have experienced that problem too), test and give us ur result, :) J. Espinal, Camilo Echeverry wrote:> Hi. > I'm trying to get digits form the user via agi > something like this: this only should print result=asciicode > > but none of the functions even wait until timeout .. > they just pass .. (after a nanosecond) > > the las print is always timeout. > > Any clue ..? > > > my $callerid = $AGI{'callerid'} ; > if($callerid !~ /[0-9]{7,20}/){ > #way numbre one > print "EXEC PLAYBACK please_enter_your_number \"\"\n"; my $result > = <STDIN>; > print "WAIT FOR DIGIT 3000\n"; my $result = <STDIN>; > > # Way number two > # print "GET DATA please_enter_your_number \"-1\" \"10\""; my > $result = <STDIN>; > > } > print STDERR "$result"; > > > > -- > Camilo Echeverry > > Your life would be very empty if you had nothing to regret. > ------------------------------------------------------------------------ > > _______________________________________________ > --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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070213/67883762/attachment.htm