Asterisk 13 only reads the first DTMF digit

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Asterisk 13 only reads the first DTMF digit

Postby gertyes » Wed Oct 14, 2015 1:47 am

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:
Code: Select all
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}");

In another case it looks like follows:
Code: Select all
        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) {

        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?
Posts: 1
Joined: Wed Oct 14, 2015 1:17 am

Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest