Skip to main content
Detect whether an outbound call was answered by a human or an answering machine before your AI agent starts speaking.

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

  1. The agent dials out via Vobiz SIP using LiveKit’s outbound calling.
  2. When the call connects, the agent listens for audio patterns.
  3. If short silence followed by a beep is detected β†’ voicemail detected.
  4. If conversational speech is detected β†’ human answered.
  5. The agent responds appropriately for each case.

Detection logic

Environment variables

.env