[asterisk-users] AGI "GET DATA" and "WAIT FOR DIGIT" don't work

J. Espinal rakh at dangerclan.net
Tue Feb 13 07:18:07 MST 2007


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


More information about the asterisk-users mailing list