Hello
I wrote an ivr on Stersk, but after playing the audio file, I did not allow more than one digit.
In the matching pattern in _X! It means a digit or more than a digit, so why not apply in the following example?
[testdialplan]
exten => 33,1,Answer
same => n,Set(TIMEOUT(digit)=3)
same => n,Background(demo-congrats)
same => n,wait(3)
exten => _XXX!,1,NoOp(number1)
_X! means that Asterisk will only try to assemble a number until at least one digit has been obtained. That is, of course, the trivial case. Generally, when doing IVR’s digits arrive individually, so it will always match exactly one digit. The only time that it would match more is on the start of a call, where the digits are in the request URI.
tnanks for answering david
No, my problem is something else. The above code does not allow me to dial a 3-digit internal.
And as soon as you enter the first number of the Hangup happens
That’s correct. That code will not allow you to enter a three digit number using DTMF, as DTMF digits are sent individually. If there is any match with an ! the longest match based on the number of digits already received is used.
If you want a to match with a timeout, you should use . rather than ! You may want to use XXX! to avoid a timeout once three digits are entered.
You right, DTMS are sent individually
But,as i know ! means that, caller can enter nothing or unlimit of numbers
And if your opinion about ! for dtmf are right, So Why it works fine with dot (.) (For exampe X.)
ok
I realized
I wanted to write a program that supports at least one digit and more, but if (dot) let me enter at least 2 digits and more.
But it’s not like that
tanks
Right
But my question was something else. I wanted to answer this question with this question
My main problem is that my users have a context called internal, in this context there is an exten ( _X! ) In which an AGI is called as follows:
[internal]
exten => _[*#0-9a-zA-Z]!,1,NoOp(Calling FastAgi)
same => n,AGI(agi://127.0.0.1:5567/dialplan, internal)
same => n,Hangup
I do not have any problems dialing, but when I need to transfer, once the first number is called AGI, it does not allow me to enter the next digits.
And if instead ! From dot I’ll use this problem to resolve but can not enter a digit. I must enter at least two digits .