Skip to main content
The Collect Digits node prompts the caller and captures DTMF key presses. It supports input validation, retries, and configurable TTS for prompts.

Behavior

  • Plays a prompt message (via TTS or pre-recorded audio)
  • Listens for DTMF key presses until the terminate key is pressed, max digits are reached, or timeout occurs
  • Validates input against an optional regex pattern
  • Retries on invalid input up to the configured retry count
  • Stores collected digits and count in output variables

Configuration

Input settings

ParameterTypeDefaultRangeDescription
minDigitsnumber11–32Minimum digits required
maxDigitsnumber161–32Maximum digits accepted
terminateKeystring"#"single charKey that ends input early (e.g., #)
timeoutnumber101–60Overall timeout in seconds
interDigitTimeoutnumber31–15Max seconds between consecutive key presses

Validation

ParameterTypeDefaultDescription
validationPatternstring""Regex pattern to validate input (e.g., ^\d{10}$ for 10-digit numbers)
validationMessagestring"Invalid format."Message played when validation fails
retriesnumber3Number of retry attempts on invalid input (1–5)
retryMessagestring"Invalid input. Please try again."Message played before each retry

Prompt

ParameterTypeDefaultDescription
promptMessagestring"Please enter your input."TTS text for the initial prompt
audioUrlstring""URL of pre-recorded audio (takes priority over promptMessage)

TTS settings

ParameterTypeDefaultDescription
providerenum"ElevenlabsTTSConfig"TTS provider
modelenum"eleven_flash_v2_5"TTS model
voicestring"default"Voice identifier
voiceIdstring""Provider-specific voice ID
speednumber1.0Speech rate (0.5–2.0)

Output handles

HandleDescription
SuccessValid digits collected
TimeoutNo input received within the timeout
InvalidAll retry attempts exhausted with invalid input

Output variables

VariableTypeDescription
digitsstringThe collected DTMF digits
digit_countnumberNumber of digits collected

Use cases

Prompt for a 10-digit account number with validationPattern: "^\d{10}$". On success, pass {{digits}} to a Database node.
Set maxDigits: 4, terminateKey: "#", and validationPattern: "^\d{4}$" to collect a 4-digit PIN.
Set minDigits: 10, maxDigits: 15 to collect an international phone number. Use the digits output variable in an SMS node to send a confirmation.