Dialplan WaitExten() can't get the number input correctly

Hi everyone, I am new here. I have some problems on dialplan function WaitExten().
I wrote a diaplan like:

[callin]
exten => _X.,1,Ringing()
exten => _X.,n,Wait(2)
exten => _X.,n,Answer()
exten => _X.,n,Set(CDR(dialnum)=${CALLERID(dnid)})
exten => _X.,n,Set(TotalTry=0)
exten => _X.,n,Goto(callin,s,1)

[get_exten]
exten => s,1,Set(Predigits=)
exten => s,n,Set(TotalTry=$[${TotalTry} + 1])
exten => s,n,GotoIf($[${TotalTry} > 3]?hang,1)
exten => s,n,Playback(hello)
exten => s,n,WaitExten(7)
exten => s,n,Wait(1)
exten => s,n,Goto(s,1)
exten => hang,1,Hangup()

exten => _X.,1,Log(DEBUG, EXTEN=${EXTEN})

exten => i,1,Goto(s,1)
exten => t,1,Goto(s,1)

As you can see, it just plays an audio tip like “hello ,please type in the number”, waits 7 seconds for the user input and then outputs it to the asterisk console. Most of the time it works fine, now the problem is when I type in a series of number fast, it can not got the correct numbers. eg: If I type in “123456” quickly on my telephone in about 2 seconds. the WaitExten(7) function got “1345” and outputs to the asterisk console, it loses the number “2” and “6”. Has anyone ever encounter similar problem?
Any suggestions will be greatly appreciatly.
Thanks!

What is the channel technology? If VoIP, what is the DTMF mode and codec? If analogue, which brand and model of line card (NB Digium have a commercial support department that doesn’t monitor this forum)? Is there any mobile phone network involved?

What do you get if you enable DTMF logging, in logger.conf?

[quote=“david55”]What is the channel technology? If VoIP, what is the DTMF mode and codec? If analogue, which brand and model of line card (NB Digium have a commercial support department that doesn’t monitor this forum)? Is there any mobile phone network involved?

What do you get if you enable DTMF logging, in logger.conf?[/quote]

I have a voice card Digium, Inc. Wildcard TE410P/TE412P quad-span T1/E1/J1 card 3.3V (rev 02) connects the PSTN and the DAHDI. And then the DAHDI get throughs to the Asterisk. Actually I don’t really know the configurations. There’s no mobilephone network. I checked the logger.conf there’s only one line : full => notice,warning,error,debug,verbose

Thanks!

edit logger.conf and add the following line

dtmflog => dtmf
and then run asterisk -rx "logger reload"
then you will have dtmflog file in /var/log/asterisk/log
Call again and check the log if you have dtmf log there or not .

[quote=“omid_mohajerani”]edit logger.conf and add the following line

dtmflog => dtmf
and then run asterisk -rx "logger reload"
then you will have dtmflog file in /var/log/asterisk/log
Call again and check the log if you have dtmf log there or not .[/quote]

I enable the dtmf log as you said. I also called and typed in the “123456” and then I checked the log and found that some digits was unable to pass through to the channel. Below is the log:

[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ‘2’ received on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ignored ‘2’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end ‘2’ received on DAHDI/i1/85106747-183, duration 12 ms
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end passthrough ‘2’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ‘4’ received on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ignored ‘4’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end ‘4’ received on DAHDI/i1/85106747-183, duration 12 ms
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end passthrough ‘4’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ‘5’ received on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ignored ‘5’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end ‘5’ received on DAHDI/i1/85106747-183, duration 0 ms
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end accepted without begin ‘5’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end passthrough ‘5’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ‘6’ received on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF begin ignored ‘6’ on DAHDI/i1/85106747-183
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end ‘6’ received on DAHDI/i1/85106747-183, duration 12 ms
[Jun 13 13:40:35] DTMF[15725] channel.c: DTMF end passthrough ‘6’ on DAHDI/i1/85106747-183

Obviously “1”,“3” was lost. It’s not alway lost the same digits, all digits(0-9) are possible. I am sure that my telephone num keys are good. What’s the possible reasons accounts for this? Any suggestions?
Thanks a lot!

You are going to have to talk to the supplier of your ISDN PRI circuit as the asterisk is not receiving the digits.
Try conncecting a ISDN simulator and testing from that.