Asterisk 11 Dtmf Not Recognised

Home » Asterisk Users » Asterisk 11 Dtmf Not Recognised
Asterisk Users 5 Comments

Hi

I have a dialplan as per the following,

extensions.conf
[avgtest]
exten = 100,n,Playback(avgtest/message1)
exten = 100,n,Set(rightPIN=1)
exten = 100,n,Read(inPIN,,1,,5,3) ; Attempts for 5 times with 3 seconds of timeout exten = 100,n,GotoIf($[“${inPIN}” = “${rightPIN}”]?pin-accepted,1)
exten = 100,n,Hangup() ; Didn’t go to pin-accepted, so play badPIN and hangup exten=pinaccepted,1,Playback(avgtest/message2) ; correct pin, play

sipconf
[1001]
uername01
secret01
context=avgtest disallow=all allow=ulaw allow=alaw dtmfmode=auto type=friend host=dynamic canreinvite=yes relaxdtmf=yes

This looks very simple but dtmf is not recognised.

Am using asterisk 11.

Any suggestions is much appreciated.

Regards

5 thoughts on - Asterisk 11 Dtmf Not Recognised

  • Am using Read application to get the digit, since its recognizing… I
    would like to get for 3 attempts and then after 3rd attempt it has to playback some different message like entries exceeded.

    My dialplan as, exten = 100,1(begin),Playback(letters/a)
    exten = 100,n,Set(rightPIN=1)
    exten = 100,n,Read(inPIN,,1,skip,3,3) ; Attempts for 5 times with 3 seconds of timeout exten = 100,n,GotoIf($[“${inPIN}” = “${rightPIN}”]?pin-accepted,1)
    exten = 100,n,Playback(letters/c) ; Didn’t go to pin-accepted, so play badPIN and hangup exten = pin-accepted,1,Playback(letters/b) ; correct pin, play

    what happens its keep on asking to enter digit If my DTMF didnt match. Do i need to use any return function… ?

    Actually my goal is to ask for 3 times and if not matched then return to some other application.

    Thanks in advance.

  • Finally got it working with 3 attempts by the fialplan,

    exten = 300,1,Playback(letters/a)
    exten = 300,n,Set(gottries=0)
    exten = 300,n(getmore),Set(rightPIN=1)
    exten = 300,n,Read(inPIN,,1,skip,3,3) ; Attempts for 3 times with 3 seconds of timeout exten = 300,n(gotdigit),GotoIf($[“${inPIN}” = “${rightPIN}”]?pin-accepted,1)
    exten = 300,n,Set(gottries=$[${gottries}+1];
    exten = 300,n,GotoIf($[${LEN(${inPIN})} == 0]?reallynothing:gotdigit)
    exten = 300,n(reallynothing),GotoIf($[${gottries}>3]?done:getmore) ;
    Attempts for 3 tries if greater than 3 then it will come out or else getmore will called exten = 300,n(done),Playback(letters/c) ; Didn’t go to pin-accepted, so play badPIN and hangup exten = pin-accepted,1,Playback(letters/b) ; correct pin, play

    Thanks