The element allows callers to input digits to the call using keypads which are then sent via POST or GET to a URL for processing.
There are many ways to get creative with but its most common use case is in creating IVR menus. This is done by nesting prompts for input from the caller using the or elements. Only a single or element can be nested in a tag.
By default an unlimited number of digits can be gathered. The will timeout after 5 seconds pass without any new digits or once the '#' key is pressed, then the gathered digits will be submitted to the current InboundXML document. This default behavior of can be altered using its provided element attributes.
The URL where the flow of the call and the gathered digits will be forwarded to.
Method used to request the action URL.
The number of seconds should wait for digits to be entered before requesting the action URL. Timeout resets with each new digit input. If a timeout event occurs the
The key a caller can press to end the
The maximum number of digits to .
The element cannot be nested within any other verbs besides the default element.
The and elements MUST nested within the element.
<Response> <Gather action='http://your-url.com/' method='GET' numDigits='4' finishOnKey='#'> <Say>Please enter your 4 digit pin</Say> </Gather> </Response>
- If nested or elements are present, the timeout attribute starts after either the first key to be gathered is pressed or say/play prompt completes.
- If the verb fails to execute, the next verb below it will execute if it is present.
Updated over 1 year ago