The GetDigits Element
Note: The GetInput XML element is designed to replace Plivo’s older GetDigits XML element, which only supports the collection of digit press inputs. We recommend you use GetInput instead of GetDigits even if you only intend to collect digit press input from users.
You can use the GetDigits element to collect the digits entered by a caller. Once the caller finishes entering the digits, the API submits the data to the provided action URL using a HTTP GET or POST request.
You can play a message nested inside the GetDigits element while the digits are being received in the background, which is useful for creating an interactive voice response (IVR) tree.
Nesting rules
You can nest Speak and Play elements within the GetDigits element.
Attributes
async boolean | Proceed to next element after the first digit is sent. Allowed values: |
Nesting rules
You can nest Speak and Play elements within the GetDigits element.
Attributes
action stringCallback-retry configurable | The URL to which the digits are sent. See the “Parameters sent to the action URL” table below for more information. Allowed values: a full qualified URL |
method string | Method used to send HTTP request to the Allowed values: GET, POST |
timeout integer | Time in seconds to wait to receive the first digit. If the user fails to provide input within the Allowed values: any positive integer |
digitTimeout integer | Time in seconds allowed between consecutive digit inputs. If input is not provided within the Allowed values: any positive integer |
finishOnKey string | A digit that the user can press to submit digits. Allowed values: One and only one of 0–9, *, #, <empty string>, If set to <empty string> or |
numDigits integer | Maximum number of digits to be processed in the current operation. Only the number of Allowed values: integer >= 1 |
retries integer | Indicates the number of retries the user is allowed to input digits if digits are not received within the time specified by Allowed values: integer >= 1 |
redirect boolean | Redirect to Allowed values: |
playBeep boolean | Plays a beep when all Speak and Play elements finish executing. Allowed values: |
validDigits string | Specifies the set of digits the user is allowed enter. Allowed values: any digit, |
invalidDigitsSound string | URL of the sound file to be played when the user enters an invalid digit. Allowed values: Any remote sound file URL (MP3 or WAV) |
log boolean | If Allowed values: |
Parameters sent to the action URL
These parameters are sent to the action
URL after DTMF input is captured.
Digits | The digits input by the caller, excluding the |