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.
###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.
Valid values: POST, GET
Default value: POST
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 Digits variable passed will be empty.
Valid values: integer greater than or equal to 0
Default value: 5
The key a caller can press to end the
Valid values: digits 0 to 9, #, or *
Default value: #
The maximum number of digits to .
Valid values: integer greater than or equal to 1
Default value: 1


The element cannot be nested within any other verbs besides the default element.

The and elements MUST nested within the element.

  <Gather action='' method='GET' numDigits='4' finishOnKey='#'>
    <Say>Please enter your 4 digit pin</Say>



  • 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.