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!