I am reading the source code for MBasicDigit class, and I still don't understand in java code, how this element will throw out no match event, if length of the digit is less than min length and/or more than max length?
My understanding is all these java classes is use to translate the whole cisco app into VoiceXML format, and VXMLServer to parse it and run from there. Does my understanding correct?
1) Only the Studio 'voice' element (with a square on it) creates VXML tags at runtime. The Digits element creates a tag that tells the gateway to load up the 'builtin' grammar named 'digits with minlength and maxlength based on the Studio settings.
2) Per the VXML Specification atVoice Extensible Markup Language (VoiceXML) Version2.0
"The VXML digits grammar can be parameterized as follows: digits?minlength=n;maxlength=m
*minlength=n: A string of at least n digits. Applicable to speech and DTMF grammars. Anything less than minlength causes a nomatch.
*maxlength=m: A string of at most n digits. Applicable to speech and DTMF grammars. The gateway stops listening when it hears maxlength touch tonesfrom the caller.
3) The Digits element creates a VXML Page that tells the gateway to use the builtin 'Digits' drammar with MinDigits and MaxDigits based upon the Studio Settings tab.
The gateway follows the VXML Specification and prompts, collects, and if there are not enough digits entered the voice browser on the gateway throws a 'nomatch' event. If you've set the MaxNoMatch to 3, then the gateway reprompts and re-collections. Once the gateway encounters the max number of NoMatch events it sends a variable named 'maxnomatch' with the value of 'yes' to VXMLServer and the Studio app continues down the maxnomatch path.
One more question, when we testing on cell phone that you can backspace the character, and we found the weird behavior.
For example, the correct card number to pass authentication is 4040123413241234, and I specify the length should be min=16&max=17, (since the pound key also treat as digit, I need a little bit tweak to make it what I want).
But on the phone, when I type 4041, and I realize I enter the wrong number, I backspace the 1, and continue to enter the correct number, press the # to terminate, it will failed on the authentication.
My understanding is, once I enter the digit, the gateway start to listening what I enter, and if I modified the digits like "4041", then backspace, enter "0", the gateway will treat the value become "40410" and continue until termchar is enter or timeout?
There is no 'backspace' character.
If the caller knows they entered an incorrect dtmf, they could press *
(causing an immediate NoMatch) and then you'd prompt them to enter the
entire string all over again.
Thanks for the help