= Input ( <max
digits>, [wait in seconds], [enter key], [esc key], [mask]
Accepts input from the telephone keypad and through speech recognition.
digits> Maximum number of digits allowed to enter by the user.
in seconds] Duration in seconds to wait for inputs. If this parameter is 2, the IVR will wait for a maximum of 2 seconds to get the input from the user. This countdown value will be reset after each input.
key] The key to be pressed by the user on completing the input.
key] Key pressed by the user for canceling the previous value entered.
This optional argument is used for
filtering the input. The default mask is "0123456789".
Returns the entered value/recognized word.
- The input() will accept
a maximum of <max digits> numbers entered through the telephone keypad or when recognized through speech with the Xtend IVR waiting for a duration of [wait in seconds] between two consecutive inputs or until the [enter key] is pressed. The function returns the entered value/recognized word.
- The pre-defined variable $InputMode recognizes the mode of Input() operation. The mode of input operation can be classified into pulse (P), tone (T) and speech recognition (S).
1) When mode of input() is through telephone keypad:
$num = Input(2,3,#,*,"02468")
- Here Input() waits for 2
digits to be entered or a 3-second delay with no key press, which
ever is earlier. Pressing # acts as the <Enter> key and
pressing * will erase the previously pressed keystrokes, allowing
re-entry. Input() will accept only even numbers,
since it is masked with "02468".
2) When mode of input() is through speech recognition:
//Enable grammar and set the words to be recognized
$retry = 3
while $retry > 1
$retry -= 1
//Accept a number between 0 - 9
$Key = input(1,7)
if $InputMode == "S"
if srConfidence() >= 100
if $InputMode == "S"
//Perform a translation to the appropriate keypress
See also Accept()
- Here Input() waits till a word is recognized or a 7-second delay with no key press, which
ever is earlier. If mode of input is through speech recognition then compare the recognized word with the defined words and play the
corresponding wave file.