Skip to navigation

DTMF tool

Let an assistant press keys on the phone keypad during a call

The DTMF tool lets your assistant press keys on the phone keypad during a call. Your assistant listens to the other side, decides which keys to press, and Vapi sends the matching dual-tone multi-frequency (DTMF) tones.

The DTMF tool only sends tones. To collect keys your caller presses, use keypad input. To compare all the ways to send and receive tones, see Keypad tones (DTMF).

When to use the DTMF tool

Use the DTMF tool when your assistant must react to what it hears before pressing keys. Common examples:

  • Navigate a phone menu. Your assistant calls a business, hears “Press 1 for billing,” and presses 1.
  • Enter an ID or code. Your assistant enters a member ID, an account number, or a conference ID when a phone system asks for it.
  • Accept a forwarded or screened call. Some forwarding and call-screening services ask the answering party to press a key before they connect the call.

Use a different method when:

Requirements

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

What you can send depends on the provider. For example, pause characters work on Twilio and Telnyx but not on Vapi numbers. See Where keypad tones work.

How the tool works during a call

  1. Your assistant calls the tool. It passes the keys to press as a single string, such as 1 or 1234#.
  2. Vapi sends the tones through the call’s provider. If the provider rejects the request, Vapi plays the tones as audio on the call instead.
  3. The tool returns right away. The result tells the assistant the tones were sent. It doesn’t confirm that the other side received them.
  4. Your assistant waits. After pressing keys, your assistant doesn’t speak or press more keys until the other side says something. On a phone menu, that’s usually the next prompt.

Because of step 4, your assistant presses one set of keys per turn. Send everything a prompt asks for in one tool call, and expect the next tool call after the phone system’s next prompt.

Next steps