Why Does It Take Several Seconds To Interpret DTMF-input ?

Home » Asterisk Users » Why Does It Take Several Seconds To Interpret DTMF-input ?
Asterisk Users 9 Comments

Hello,

I notice that it takes 4 to 6 seconds between someone pressing a cipher and Asterisk continuing inside the dialplan. How come ???

Taken from verbose logfile :

(attempt 1)
[Jun 11 15:29:25] DTMF[18549] channel.c: DTMF begin ‘1’ received on SIP/SipAgenT01-00001eb0
[Jun 11 15:29:25] DTMF[18549] channel.c: DTMF begin ignored ‘1’ on SIP/SipAgenT01-00001eb0
[Jun 11 15:29:25] DTMF[18549] channel.c: DTMF end ‘1’ received on SIP/SipAgenT01-00001eb0, duration 180 ms
[Jun 11 15:29:25] DTMF[18549] channel.c: DTMF end passthrough ‘1’ on SIP/SipAgenT01-00001eb0

[Jun 11 15:29:30] VERBOSE[18549] pbx.c: [Jun 11 15:29:30] == CDR
updated on SIP/SipAgenT01-00001eb0
[Jun 11 15:29:30] VERBOSE[18549] pbx.c: [Jun 11 15:29:30]

9 thoughts on - Why Does It Take Several Seconds To Interpret DTMF-input ?

  • Jonas Kellens wrote:

    Jonas,

    Please provide the version of Asterisk you are using and the part of the dialplan that receives the DTMF input.

    Regards,

    Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer

  • Hello,

    using Asterisk 1.8.12.2.

    Dialplan :

    exten => ivr,1,NoOp()
    exten =>
    ivr,n(restartprompt),Background(/var/lib/asterisk/sounds/vprompts/${KNUMMER}/${ASTPROMPT})
    exten => ivr,n,NoOp(${BACKGROUNDSTATUS})
    exten => ivr,n,WaitExten(15)
    exten => ivr,n,GoTo(restartprompt)

    exten => _X,1,Set(choice=${EXTEN})
    exten => _X,n,System(echo
    “‘${klantID}’,’IVR’,’${choice}’,”,’${CHANNEL:4}’,’$(date +%s)'” >>
    /var/log/asterisk/loggingAST/${CHANNEL:4}.csv)
    exten => _X,n,other_stuff_I_do

    exten => _X.,1,Set(choice=${EXTEN})
    exten => _X.,n,System(echo
    “‘${klantID}’,’IVR’,’${keuzeID}’,”,’${CHANNEL:4}’,’$(date +%s)'” >>
    /var/log/asterisk/loggingAST/${CHANNEL:4}.csv)
    exten => _X.,n,other_stuff_I_do

    Kind regards,

    Jonas.

  • Dialplan :

    It is waiting for more digits because you have asked it for a possible multi-digit exten and it needs to distinguish between the _X and _X. patterns.

    Richard

  • Ok thanks.

    Any idea how I can resolve this ?

    Even if there *can* be more than 1 digit, in case there is only 1 digit it should go faster.

    Could this dialplan logic be a good solution :

    [my-context]
    exten => ivr,1,NoOp()
    exten =>
    ivr,n(restartprompt),Background(/var/lib/asterisk/sounds/vprompts/${KNUMMER}/${ASTPROMPT})
    exten => ivr,n,NoOp(${BACKGROUNDSTATUS})
    exten => ivr,n,WaitExten(15)
    exten => ivr,n,GoTo(restartprompt)

    exten => _X,1,Set(choice=${EXTEN})
    exten => _X,n,System(echo
    “‘${klantID}’,’IVR’,’${choice}’,”,’${CHANNEL:4}’,’$(date +%s)'” >>
    /var/log/asterisk/loggingAST/${CHANNEL:4}.csv)
    exten => _X,n,other_stuff_I_do

    exten => ivradvanced,1,NoOp()
    exten =>
    ivradvanced,n(restartprompt),Background(/var/lib/asterisk/sounds/vprompts/${KNUMMER}/${ASTPROMPT})
    exten => ivradvanced,n,NoOp(${BACKGROUNDSTATUS})
    exten => ivradvanced,n,WaitExten(15)
    exten => ivradvanced,n,GoTo(restartprompt)

    exten => _X.,1,Set(choice=${EXTEN})
    exten => _X.,n,System(echo
    “‘${klantID}’,’IVR’,’${keuzeID}’,”,’${CHANNEL:4}’,’$(date +%s)'” >>
    /var/log/asterisk/loggingAST/${CHANNEL:4}.csv)
    exten => _X.,n,other_stuff_I_do

    [another-context]

    Kind regards,

    Jonas.

  • The only way to resolve this is to redesign your dialplan so you do not have ambiguous matching, This is not an Asterisk issue, this is an issue with the way you designed your dialplan and would apply to any IVR on any system.

    —–Original Message—

  • [snip]

    Would it help if they pressed for example “1” followed by the “#” key?
    If not then, as Eric mentioned, redesign your dialplan. Any IVR with a double digit amount of options needs some rethinking. IMHO the average attention span of a person is such that at option 6 they forgot options
    1 through 5. And if the option explanations last longer than 5 seconds it gets even worse.

    Regards, Patrick

  • I understand that I need to re-design my dialplan logic.

    I gave an example of my re-design in my last post. Would that have been a good re-design ?? Or is it still ambiguous ?

    I will post it again :

    [my-context]
    exten => ivr,1,NoOp()
    exten => ivr,n(restartprompt),Background(/var/lib/asterisk/sounds/vprompts/${KNUMMER}/${ASTPROMPT})
    exten => ivr,n,NoOp(${BACKGROUNDSTATUS}) exten => ivr,n,WaitExten(15) exten => ivr,n,GoTo(restartprompt)

    exten => _X,1,Set(choice=${EXTEN})
    exten => _X,n,System(echo “‘${klantID}’,’IVR’,’${choice}’,”,’${CHANNEL:4}’,’$(date +%s)'” >>/var/log/asterisk/loggingAST/${CHANNEL:4}.csv)
    exten => _X,n,other_stuff_I_do

    exten => ivradvanced,1,NoOp()
    exten => ivradvanced,n(restartprompt),Background(/var/lib/asterisk/sounds/vprompts/${KNUMMER}/${ASTPROMPT})
    exten => ivradvanced,n,NoOp(${BACKGROUNDSTATUS})
    exten => ivradvanced,n,WaitExten(15)
    exten => ivradvanced,n,GoTo(restartprompt)

    exten => _X.,1,Set(choice=${EXTEN})
    exten => _X.,n,System(echo “‘${klantID}’,’IVR’,’${keuzeID}’,”,’${CHANNEL:4}’,’$(date +%s)'” >>/var/log/asterisk/loggingAST/${CHANNEL:4}.csv)
    exten => _X.,n,other_stuff_I_do

    [another-context]

    Kind regards,

    Jonas.

  • No. When you dial “1” the PBX does not know if it needs to match _X or _X.

    —–Original Message—

  • Jonas Kellens wrote:

    Jonas,

    Use the TIMEOUT function to set the maximum amount of time permitted between digits when the user is typing in DTMF. As you’ve discovered, the default is 5
    seconds.

    The following example reduces it to 2 seconds:

    exten => ivr,1,NoOp()
    exten => ivr,n,Set(TIMEOUT(digit)=2)
    exten => ivr,n(restartprompt),Background(/var/lib/asterisk/sounds/vprompts/${KNUMMER}/${ASTPROMPT})
    exten => ivr,n,NoOp(${BACKGROUNDSTATUS})
    exten => ivr,n,WaitExten(15)
    exten => ivr,n,GoTo(restartprompt)

    Enter ‘core show function TIMEOUT’ at the Asterisk CLI for more information about the TIMEOUT function.

    Regards,

    Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer