Keypad input settings
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
Select an assistant
Open the Dashboard. Select Assistants, then select the assistant you want to configure.
API fields
Configure caller keypad input with keypadInputPlan when you create or update an assistant:
This example processes input after 2 seconds or when the caller enters #:
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
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.