View on GitHub
Clone and run the full working example
Getting started
Overview
When making outbound calls at scale, many calls land on voicemail. This example shows how to detect a machine answer versus a human answer, and react accordingly - leaving a pre-recorded message for voicemail, or starting a live conversation with a human.How it works
- The agent dials out via Vobiz SIP using LiveKit’s outbound calling.
- When the call connects, the agent listens for audio patterns.
- If short silence followed by a beep is detected → voicemail detected.
- If conversational speech is detected → human answered.
- The agent responds appropriately for each case.
Detection logic
Environment variables
.env
Related LiveKit templates
- LiveKit inbound calling - route calls to a Vobiz number into a LiveKit agent over a SIP trunk.
- LiveKit outbound calling - place calls from a LiveKit agent through a Vobiz SIP trunk.
- Call transfer - transfer a live call to any phone number with SIP REFER.
- DTMF IVR - an IVR menu that accepts keypad input as well as speech.
- Agent-to-agent handoff - pass a call to a specialist agent with the conversation context.
- Webhooks and CRM integration - push HMAC-signed call events to your CRM.
- All features in one agent - inbound, outbound, transfers, DTMF, AMD, and webhooks together.