Hello All,
I’ve setup a small deployment where the read command not functioning as i expected.
exten => 1,Goto(ivr,s,1)
[ivr]
exten => s,1,Playback(pls-enter-number)
same => n,Read(Number,2,10)
same => n,SayDigits(${Number})
exten => t,1,Playback(enter-correct-input)
the read command expect the user to enter # at the end of the user input if they didn’t specify it ill ask for the user to enter the correct input.
But in my case if i didnt press # also it will read the number instead of playing enter the correct input.
Thanks
I guess you misunderstood the functionality of that cmd voip-info.org/wiki/view/Asterisk+cmd+Read
ok i chaged my setup as below but
This is what i’m expecting
Defaults to 0 - no limit - wait for the user press the ‘#’ key. Any value below 0 means the same. Max accepted value is 255.
exten => 1,Goto(ivr,s,1)
[ivr]
exten => s,1,Playback(pls-enter-number)
same => n,Read(Number,pls-enter-number,0,2,10)
same => n,SayDigits(${Number})
exten => t,1,Playback(enter-correct-input)
Still i’m having the same issue
But you have 10 seconds timeout. And at some point the cmd will timeout so better adjust the digits for fixed length.
if i use digits there i won’t able to get user to press # at the end of input.
i wanna to take # at the end to indicate end of user input if i use fixed digit length means the read command doesn’t require user to enter # at the end.
Thanks
Sorry I don’t get the logic to force the use of pound key. If you are trying to use read to validatea number and dial try DISA.
Hi
same => n,Read(Number,pls-enter-number,0,2,10)
what that 0 mean in that line
as per asterisk it says Defaults to 0 - no limit - wait for the user press the ‘#’ key.which means it will read the input till # Right.#(end of statement)
if i change the value to 8 or 9 it won’t require #
maximum acceptable number of digits. Stops reading after maxdigits have been entered (without requiring the user press the ‘#’ key)
Firstly please unlearn “wanna”. It is not an English language learner’s mistake, it is something you have actually learned. I can put down the other English lanuguage errors (e.g. “i” and missing articles) to not being familiar with the language, but not “wanna” (or “ur”). There is no such word in my concise English dictionary, and there are actually very few Engish auxiliary verbs that be used without a following full infinitive.
The “t” extension is not used by normal applications, and only used in the context of extensions (Read reads a number which may or may not be an extension). It is used when overlapped dialing is in use and either not enough digits have been enterered to match any extension, or the Dial application receives an indication that a number is valid but incomplete.
A timeout of the Read application is signalled by setting the READSTATUS variable to “TIMEOUT”.
You might also want to note that voipinfo.org isn’t the most reliable source of information, and, in this case, fails to describe the READSTATUS variable. To get the official documentation for Read, type “core show application read” at the CLI prompt.