Hi all,
I’m using Asterisk 13 to read DTMF by using the dialplan Read() application through AGI.
It was working fine but since Friday it only reads the first DTMF digit in a sequence of key presses.
I didn’t make any config changes to any config files but this strange phenomena just started and I cannot get it to read all the digits in my key press sequence.
The code for the AGI code looks like follows in the one case:
int noOfAttempts = 0;
while (noOfAttempts <= 1 && otherPeer.isEmpty()) {
agiChannel.exec("Playback", Sounds.ENTER_NUMBER_TO_CALL.getFilename());
agiChannel.exec("Playback", Sounds.FOLLOWED_BY_THE_POUND_KEY.getFilename());
agiChannel.exec("Read", "otherpeer,,0,,,5");
otherPeer = agiChannel.getFullVariable("${otherpeer}");
noOfAttempts++;
}
In another case it looks like follows:
String dtmf = null;
Integer delay = 3;
Integer tries = 3;
if (entryDelay != null) {
delay = entryDelay;
}
if (numTries != null) {
tries = numTries;
}
try {
agiChannel.exec(AgiApplication.READ.getName(), "generalDtmf," + promptFilename + ",0,," + tries + "," + delay);
dtmf = agiChannel.getFullVariable("${generalDtmf}");
} catch (AgiException agiEx) {
agiEx.printStackTrace();
}
return dtmf;
As can be seen in one case a number of tries are used and the other case it is done manually. The delay was set to be 3 seconds, but it doesn’t make a difference.
Is there a possibility that my Asterisk 13 installation went haywire or am I doing something wrong in my code?