Skip to main content
This page covers the XML elements for collecting user input: DTMF digit presses and automatic speech recognition.

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
Prompts play while waiting for input. Input collection starts as soon as the first digit is pressed.

Phone Tree (IVR)

Handle the input on your server:

PIN Entry

Collect a specific number of digits:
Note: Set log="false" for sensitive input like PINs.

Variable Length Input

Use finishOnKey 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

  1. Nested <Speak> or <Play> elements execute
  2. If playBeep="true", a beep plays
  3. Digit collection starts
  4. Collection ends when:
    • numDigits reached
    • finishOnKey pressed
    • timeout or digitTimeout expires
  5. Digits sent to action URL
  6. Response XML from action URL executes
If no digits are received after 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

Use hints to boost recognition of specific words:
Limits:
  • 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.