AGI-PHP agi->get_data, just get 3 digits

I have my script with AGI-PHP where I get the variables when somebody press the buttons of a remote phone with AGI->get_data.

This function have 3 parameter, the third paramater are the maximum digits than can get, I tested putting 9999, and others but always just want get 3 digits.

I want can get more than 3 digits, if in the remote phone I press 4 digits, the variable is empty, with one, two or three digits is working fine.

How can I get more than 3 digits?

Best Regards

you should provide us with a piece of code you are using
and a CLI output.

Im experiencing the same problem but in a perl agi script. This is my code of it where when expecting 8 digits(and really pressed) it detects any 5, 6 , 4, 7 digits random.

#!/usr/bin/perl -
use Asterisk::AGI;
use DBI;
use Mail::Sendmail;
use LWP::Simple;

$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();

my $callerid = ‘’;
my $i=0;
until(0){
last if $i >= 3 || length($callerid) eq 8;
$callerid = $AGI->get_data(‘IngresaTus8Digitos’,2500,8);
$i++;
$AGI->verbose("$i - callerid:$callerid, largo:".length($callerid),1);
}


the same with a while loop
while(($i < 3) && (length($callerid) != 8) )
DONT WORK,

It is an outside call

Is it something with the DTMF tones detected, can it be configured somewhere in the source concerning lenght, timing, or whatsoever…?? Any one knows how to fix this or a workaround…
thanks

This might be a different issue but you may check:

1- The phone you are using, recently I was using zoiper and
had the same exact problem, upgrading to latest release
solved the problem

2- Check relaxdtmf if you are using dahdi as the channel

3- Upgrade to latest release, some DTMF issues were corrected in 1.4

4- Try both SIP INFO and RFC2833

Good luck

Make sure that you provide enough timeout for the function, because the timeout will start as soon as you press your first digit. i suspect that you provide a tiny timeout to your function and when you press your first digit the function will timeout before your second digit?
Notice that timeout in the php agi is in millisecond, so for example try to make it 5000.
i think this will solve your problem!

Im calling from outside, son no softphones nor ipphones are involved. Through pri_cpe signalling, span=1,1,0,ccs,hdb3,crc4
Im using Asterisk v1.4 with Zaptel
The issue happens to detect maybe the last 5 or 6 digits of 8, or perhaps the first digit but not the second one, and yes the rest, its hard to say which of the 8 digits may not detect. Not exactly the first one, ragarding the timeout.
Is perl AGI