WaitExten() don't catch digit

Hello, I’m using asterisk on ubuntu 16 that I installed in VMwate Workstation 14, I did all the configurations to create an IVR menu but I can’t catch digits when it comes to WaitExten(), here is my code:

[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)

[work] ; Nom du contexte
exten => _7XXX,1,Set(FILENAME={STRFTIME({EPOCH},%Y%m%d%H%M)}-{CALLERID(number)} -{EXTEN})
exten => _7XXX,2,Monitor(wav,{FILENAME},mb) exten => _7XXX,3,Dial(SIP/{EXTEN},20)
exten => _7XXX,4,Set(CHANNEL(musicclass)=ulaw)
exten => _7XXX,5,VoiceMail(${EXTEN}@work)

;Numéro de la boite vocale
exten => 600,1,VoiceMailMain(${CALLERID(num)}@work)

;extensions des IVR
;exten => 00,1,Goto(all-ivr,s,1)

;Contexte all-ivr
;[all-ivr]
;All IVR
exten => 00,1,Answer()
exten => 00,2,Set(TIMEOUT(response)=10)
exten => 00,3,agi(googletts.agi,“Bienvenus chez IOSM!”,fr,any)
exten => 00,4,agi(googletts.agi,“Qui souhaitez vous joindre?”,fr,any)
exten => 00,5,agi(googletts.agi,“Pour Windows PC, tapez 1”,fr,any)
exten => 00,6,agi(googletts.agi,“Pour Linux OS, tapez 2”,fr,any)
exten => 00,7,agi(googletts.agi,“Pour Android Phone, tapez 3”,fr,any)
exten => 00,8,agi(googletts.agi,“Appuyez sur dièse si vous souhaitez réécouter ce message”,fr,any)
exten => 00,9,WaitExten()

exten => 1,1,Goto(work,7001,1)
exten => 2,1,Goto(work,7002,1)
exten => 3,1,Goto(work,7003,1)
exten => _[4-9#],1,Goto(00,3)
exten => t,1,Goto(00,3)

You should add Background() app before the WaitExten()

hello sir.
I add Background() before WaitExten() but it still don’t working

post the Asterisk CLI output, and also make sure DTMF works

Can you tell me how to do it because I’m new in asterisk

  1. https://wiki.asterisk.org/wiki/display/AST/Background+and+WaitExten+Applications

  2. https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

in my case, some times dtmf is not working.
after change dtmf_mode, it works well.

how about check dtmf_mode ?

please sir can you tell me how to check it

It’s simple. at Asterisk CLI, you can type “sip show settings”

or check file - /etc/asterisk/sip.conf

the “sip show settings” show me that DTMF is rfc2833

And by searching in the /etc/asterisk/sip.conf file, I found this lines that are related with DTMF:
;allowoverlap=dtmf ; Enable overlap dialing support using DTMF delivery
;relaxdtmf=yes ; Relax dtmf handling
;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
** info : SIP INFO messages (application/dtmf-relay)
** ; shortinfo : SIP INFO messages (application/dtmf)**
; dtmfmode
** dtmfmode=rfc2833**
;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
;dtmfmode=inband ; Choices are inband, rfc2833, or info
;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info
;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!

What should I do now?

It’s simple
configure dtmfmode at /etc/asterisk/sip.conf
and “reload” at asterisk CLI to apply it

now you can test your dtmf action.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.