GetDigits
The<GetDigits> element collects DTMF (touch-tone) digits entered by the caller. Use it for IVR menus, PIN entry, and numeric input.
Recommendation: Use GetInput instead of GetDigits for new applications. GetInput supports both speech and digit input.
Basic Usage
GetDigits Attributes
Nested Elements
<GetDigits> can contain:
<Speak>- Text-to-speech prompt<Play>- Audio file prompt
Phone Tree (IVR)
PIN Entry
Collect a specific number of digits:log="false" for sensitive input like PINs.
Variable Length Input
UsefinishOnKey for variable-length input:
Restrict Valid Digits
Only accept specific digits:No Redirect
Collect digits without redirecting (fire and forget):GetDigits Action URL Parameters
When digits are collected, these parameters are sent:
Plus all standard request parameters.
GetDigits Flow Behavior
- Nested
<Speak>or<Play>elements execute - If
playBeep="true", a beep plays - Digit collection starts
- Collection ends when:
numDigitsreachedfinishOnKeypressedtimeoutordigitTimeoutexpires
- Digits sent to
actionURL - Response XML from
actionURL executes
retries attempts, execution continues to the next element.
GetInput
The<GetInput> element collects user input through automatic speech recognition (ASR) or DTMF digit presses. It’s the recommended replacement for <GetDigits>, supporting both speech and digit input.
Basic Usage
GetInput Attributes
Core Settings
Timing
DTMF Settings
Speech Settings
Callbacks
Input Types
DTMF Only
Collect only digit presses:Speech Only
Collect only speech input:Both Speech and DTMF
Accept either input type (first detected wins):Speech Recognition Models
Improve Speech Recognition
Usehints to boost recognition of specific words:
- Max 500 phrases per request
- Max 10,000 characters total
- Max 100 characters per phrase
Real-Time Speech Results
Get interim transcription results as the user speaks:Interim Callback Parameters
Supported Languages
Common languages include:GetInput Action URL Parameters
When input is collected:
Plus all standard request parameters.
Handling Input on Your Server
GetInput Nested Elements
<GetInput> can contain:
<Speak>- Voice prompt<Play>- Audio prompt
Speech Recognition Pricing
Speech recognition is billed per 15-second increment.Related
- Audio Output - Speak, Play, DTMF
- Call Routing - Dial, Redirect, Hangup, Wait