Configure the DTMF tool
Before you start, read DTMF tool for what the tool does, where it works, and how it behaves during a call.
Create the tool
Dashboard
API
- In the Dashboard, select Tools, then select Create Tool.
- Select DTMF.
- Under Tool Settings, enter a Tool Name and a Description. The model sees both. The description tells it when to press keys. See Name and describe the tool.
- Leave Send DTMF via SIP INFO cleared unless your receiving system requires it. See Send tones over SIP INFO.
- Optionally, open Messages to set what the assistant says while the tool runs. See Keep the assistant quiet while it presses keys.
- Publish the tool, then add it to your assistant.
Fields
Name and describe the tool
The model sees the DTMF tool as a function with these defaults:
The default description doesn’t say when to press keys. In the dashboard, write your own in the Description field so the model knows when to use the tool and when not to.
If you change the Tool Name, use that name in your system prompt.
Write the key string
Your assistant passes all the keys for one entry in one string, for example 1 or 1234#. That string is keys.
- Allowed keys. Use
0to9,*, and#. - Pause characters. On Twilio and Telnyx,
wadds a 0.5-second pause andWadds a 1-second pause, for example1w2w3#. On other providers, Vapi doesn’t support pause characters. On Vapi numbers, the keys play back to back. See Where keypad tones work. - One entry per tool call. Send everything a prompt asks for in one string. If a phone system needs time between entries, send each entry after the prompt that asks for it. Your assistant presses keys once per turn, so several tool calls in the same turn don’t add pauses.
Tell the assistant when to press keys
The model decides when to call the DTMF tool, so your system prompt needs to say when to press keys and when not to. Without clear rules, an assistant can press keys when nothing asked for them, or send characters a phone system can’t use.
Include rules like these:
For response timing and retry strategies on phone menus, see IVR navigation.
Keep the assistant quiet while it presses keys
By default, the assistant doesn’t say anything when it presses keys. If you add a request-start message, the assistant speaks it first and then sends the tones:
A phone menu that accepts spoken answers can hear that message as input, and the message delays the tones until it finishes. Leave request-start out when your assistant is pressing keys for an automated system.
Send tones over SIP INFO
On Vapi numbers and BYO SIP trunks, set sipInfoDtmfEnabled to true to send each key as a SIP INFO message instead of the default method. On other providers, the setting has no effect on how tones are sent.
Turn it on only when the system on the other end expects DTMF over SIP INFO, such as a private branch exchange (PBX) or session border controller (SBC) you configured that way. Keep these behaviors in mind:
- Ordinary phone lines may not play the tones. SIP INFO is a signaling message, not audio. When the call goes out to an ordinary phone line, the other end may never hear anything.
- Vapi doesn’t fall back to audio tones. With the default method, if the provider rejects the request, Vapi plays the tones as audio instead. With SIP INFO, it doesn’t.
If tones stop working after you turn on SIP INFO, turn it off.
Verify tones were sent
Place a test call and get the assistant to press keys. Then check these places:
- The tool call and its result. In the Dashboard, select Logs, open the call, and select the Messages tab. Find the DTMF tool call, listed under the tool’s function name, to see the keys the assistant chose. The result is
Success.once Vapi starts sending the tones. - The call logs. If the assistant’s Logging setting is enabled, the call’s Logs tab includes a
call.dtmfSentevent with thedigitssent and thetransportProviderthe call ran on. - The other side. Neither the result nor the log entry confirms that the other side received the tones. Check the transcript to see whether the phone menu moved to its next prompt.
The DTMF tool runs inside Vapi, so your server doesn’t receive a tool-calls message when the assistant presses keys.