|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by taurean_aj in Perl Programming Language, Asterisk Open Source Telephony, Voice Over IP
Hi,
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();
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
$GetMainOption = &Dialouge1("Start_Key_Menu", "timeOut3", "1");
&Flush();
sub Dialouge1()
{
my($file,$timeout,$len)=@_;
$pin = '';
&Flush();
$pin = $AGI->get_data("$soundFilePath/$file","$timeout","$len");
return $pin;
}
sub Flush()
{
print "EXEC PLAYBACK $soundFilePath/tempTT\n";
my $i=0;
while($i<3)
{
#$tempVar = $AGI->get_data("$soundFilePath/tempTT", "1" , "1");
$tempVar = $AGI->get_data("$soundFilePath/tempTT", "1" , "1000000");
$i++;
}
$|++;
}
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_Related_20080208