Skip to navigation

Keypad input settings

Configure how an assistant collects keypad input from callers

Keypad input settings let an assistant receive dual-tone multi-frequency (DTMF) input from a caller. Use them to collect account numbers, menu selections, confirmation codes, and other keypad entries.

How keypad input works

Vapi collects the keys the caller presses and processes them when one of these happens first:

  • The timeout passes after the last key. The timer restarts each time the caller presses a key, so a caller who pauses longer than the timeout between keys produces two separate entries.
  • The caller presses a delimiter. Vapi processes the keys collected so far. The delimiter itself isn’t included in the entry.

Set the timeout to 0 when input should only be processed after the caller enters a delimiter. With a timeout of 0, always configure at least one delimiter, or the input is never processed.

When Vapi processes the collected keys, it adds them to the conversation as a user message, for example, User's Keypad Entry: 1234. If the assistant is speaking at that moment, it stops and responds to the entry. The entry is available to the model and is saved in the call’s messages and transcript when transcript artifacts are enabled. See Handle sensitive input before collecting confidential values.

Keypad input works on phone calls on Twilio, Telnyx, Vonage, Vapi numbers, and BYO SIP trunks. It doesn’t work on web calls or WebSocket calls.

Keypad input receives tones from the caller. The DTMF tool does the opposite: it lets the assistant send keypad tones to another phone system, for example, when navigating an interactive voice response (IVR) menu. To compare both directions, see Keypad tones (DTMF).

Configure via Dashboard

1

Select an assistant

Open the Dashboard. Select Assistants, then select the assistant you want to configure.

2

Open Keypad Input Settings

Select the Advanced tab, then locate Keypad Input Settings.

3

Enable keypad input

Select Enable Keypad Input.

4

Set the input timeout

Set Timeout from 0 to 10 seconds. Set it to 0 to wait for a delimiter.

5

Choose a delimiter

Under Delimiter, choose # or *.

6

Publish the assistant

Select publish in the unsaved-changes message to apply the update.

API fields

Configure caller keypad input with keypadInputPlan when you create or update an assistant:

FieldTypeBehavior
enabledbooleanEnables caller keypad input. Default is false.
timeoutSecondsnumberProcesses the collected input after 1–10 seconds pass with no new key. Default is 2 seconds. Set it to 0 to wait for a delimiter.
delimitersarray of stringsProcesses input when the caller enters one of these keys. Each item must be #, *, or "". Default is ["#", "*"]. Use an empty array to process input on the timeout only; # and * are then included in the entry like any other key. Don’t combine an empty array with a timeout of 0, because the input is never processed.

This example processes input after 2 seconds or when the caller enters #:

{
"keypadInputPlan": {
"enabled": true,
"timeoutSeconds": 2,
"delimiters": ["#"]
}
}

Handle sensitive input

Keypad input can collect general caller data, but sensitive values need additional controls. For payment information, follow the PCI compliance guide to isolate collection and prevent sensitive artifacts from being recorded or logged.

Troubleshoot keypad input

SymptomLikely causeWhat to check
Input is processed before the delimiterThe timeout expires first.Increase Timeout, or set it to 0 to require a delimiter.
Input is never processedThe timeout is 0 and the caller did not enter the configured delimiter, or no delimiters are configured.Confirm the caller enters the selected Delimiter. With a timeout of 0, configure at least one delimiter.
One number arrives as two entriesThe caller paused longer than the timeout between keys.Increase Timeout, or ask the caller to finish with a delimiter.
The entry includes # or *No delimiters are configured, so every key counts as input.Add # or * as a delimiter.
The assistant ignores the keysKeypad input isn’t enabled, or the call is a web or WebSocket call.Enable keypad input. Keypad input works on phone calls only.
The assistant does not send tones to another systemKeypad input only receives tones from callers.Add the DTMF tool when the assistant must send tones.

Keypad input does not have a dedicated call-ended reason. To see which keys the caller pressed, check the call’s logs for call.dtmfReceived events. Each event records one key, including delimiters. Then check the transcript for the User's Keypad Entry message to confirm the assistant received the entry.