Skip to main content

send_dtmf_events

Send DTMF tones to telephony providers for IVR navigation and phone systems.

Available in
Beta
|
Python

Overview

Use send_dtmf_events to send DTMF (dual-tone multi-frequency) tones to telephony providers. This is essential for navigating phone systems, IVR menus, and automated phone services.

The send_dtmf_events tool:

  • Sends DTMF events sequentially with a 0.3-second delay between each event (defined by DEFAULT_DTMF_PUBLISH_DELAY).
  • Returns a success message listing all sent events if all events are sent successfully.
  • Returns an error message if any event fails to send (stops sending remaining events on first failure).

Usage

Add send_dtmf_events as a tool to your agent:

from livekit.agents.beta.tools import send_dtmf_events
from livekit.agents import Agent, function_tool
class IVRAgent(Agent):
def __init__(self):
super().__init__(
instructions="You are an IVR navigation assistant. Help users navigate phone systems.",
tools=[send_dtmf_events],
)

Parameters

For a full list of parameters, see the send_dtmf_events reference.

eventslist[DtmfEvent]Required

List of DTMF events to send to the telephony provider. Available events include digits, special characters, and letters.