I am using asterisk 1.2.25-voiceone with xlite softphone for an IVR Solution.
Making use of the Asterisk Gateway Interface(agi) and using Perl for the logic. The input buffer does not empty itself every time i try to use the get_data function to fetch the data(input) from user. At that time somehow the input buffer is full and it doesn't accept the input character which I enter when I hear the playback file.
A temporary solution to this was to create one empty sound file named tempTT and use that in get_data for playing back that file and it works when I use get_data with tempTT file for 3 to 4 times in a loop. But again, this is a random behaviour; if buffer contains something more then I need to use tempTT file more often, may be 6 to 7 times. This is completely unacceptable solution as behaviour is randomised. Can anyone suggest me some help for this?
Wherever we get any problem of get_data not accepting input I call this function like flush();
$GetMainOption = &Dialouge1("Start_Key_Menu", "timeOut3", "1");
$pin = '';
$pin = $AGI->get_data("$soundFilePath/$file","$timeout","$len");
print "EXEC PLAYBACK $soundFilePath/tempTT\n";
#$tempVar = $AGI->get_data("$soundFilePath/tempTT", "1" , "1");
$tempVar = $AGI->get_data("$soundFilePath/tempTT", "1" , "1000000");