Build an IVR (Interactive Voice Response) menu in LiveKit that responds to both voice commands and keypad presses (DTMF tones).Documentation Index
Fetch the complete documentation index at: https://docs.vobiz.ai/llms.txt
Use this file to discover all available pages before exploring further.
View on GitHub
Clone and run the full working example
Getting started
Overview
Some callers are in noisy environments or prefer pressing keys over speaking. This example shows how to build a LiveKit agent that handles both speech input and DTMF keypad input simultaneously - providing a reliable IVR experience for all callers.How it works
- The agent presents menu options via text-to-speech.
- The agent listens for both speech (“press 1 for billing”) and DTMF tones.
- Whichever is detected first triggers the routing logic.
- The appropriate sub-menu or action is invoked.
IVR menu structure
DTMF detection
LiveKit forwards DTMF tones from the SIP leg through the SIP INFO method. The agent subscribes to DTMF events on the room and maps digits to menu choices.Environment variables
.env