VoiceML: <Input>¶
The <Input>
action allows you to collect keypad digits from the call.
Attributes¶
The <Input>
action supports the following attributes.
Attribute | Allowed Values | Default |
---|---|---|
MaxDigitCount | >= 1 and <= 128 | 128 |
NextUri | absolute or relative URI | current URI |
StopKey | 0 -9 , # , * , none |
# |
TimeoutSeconds | >= 1 and <= 30 | 5 |
MaxDigitCount¶
The MaxDigitCount
attribute specifies the maximum number of digits to collect. Once this many
digits has been collected, the action will complete, regardless of whether the StopKey
was entered.
NextUri¶
The NextUri
attribute specifies the URI where Enfonica will perform a VoiceML request
after the <Input>
action completes, regardless of whether any digits were collected. It defaults to the
current URI. As such, no actions specified after <Input>
will be executed in any scenario.
Enfonica will include the following parameters on the request to NextUri
.
Parameter | Description |
---|---|
action |
The action that has just finished executing. This will be equal to INPUT . |
digits |
The digits that were collected, excluding the StopKey . If no digits were collected, this will be empty. |
StopKey¶
The StopKey
attribute specifies a special key to indicate that no more digits should be collected.
You can use this in the scenarios where, for example, you want the caller to press #
after they enter
a number.
TimeoutSeconds¶
The TimeoutSeconds
attribute specifies the maximum amount of time to wait for input. The timeout starts
when any media has finishes playing, and restarts if any keys are pressed.
Body¶
The body of an action is the content nested within the action.
You can specify one or more <Play>
or <Say>
elements (up to 30). This will say or play the
media you specified, but allows <Input>
to interrupt the media when input is detected. For
example:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Input>
<Say>Press 1 for sales, 2 for support or 3 for everything else.</Say>
</Input>
</Response>
Note that the following attributes of <Play>
are restricted when nesting in an <Input>
action:
LoopCount
must be1
(or not specified).Digits
cannot be used.