Voicemail detection

Enable agents to automatically detect voicemail systems and optionally leave messages.

Overview

The Voicemail Detection tool allows your Conversational AI agent to automatically identify when a call has been answered by a voicemail system rather than a human. This system tool enables agents to handle automated voicemail scenarios gracefully by either leaving a pre-configured message or ending the call immediately.

Functionality

  • Automatic Detection: The LLM analyzes conversation patterns to identify voicemail systems based on automated greetings and prompts
  • Configurable Response: Choose to either leave a custom voicemail message or end the call immediately when voicemail is detected
  • Call Termination: After detection and optional message delivery, the call is automatically terminated
  • Status Tracking: Voicemail detection events are logged and can be viewed in conversation history and batch call results

Custom LLM integration

Parameters:

  • reason (string, required): The reason for detecting voicemail (e.g., “automated greeting detected”, “no human response”)

Function call format:

1{
2 "type": "function",
3 "function": {
4 "name": "voicemail_detection",
5 "arguments": "{\"reason\": \"Automated greeting detected with request to leave message\"}"
6 }
7}

Configuration Options

The voicemail detection tool can be configured with the following options:

Voicemail detection configuration
interface

  • Voicemail Message: You can configure an optional custom message to be played when voicemail is detected

API Implementation

When creating an agent via API, you can add the Voicemail Detection tool to your agent configuration. It should be defined as a system tool:

1from elevenlabs import (
2 ConversationalConfig,
3 ElevenLabs,
4 AgentConfig,
5 PromptAgent,
6 PromptAgentInputToolsItem_System
7)
8
9# Initialize the client
10elevenlabs = ElevenLabs(api_key="YOUR_API_KEY")
11
12# Create the voicemail detection tool
13voicemail_detection_tool = PromptAgentInputToolsItem_System(
14 name="voicemail_detection",
15 description="" # Optional: Customize when the tool should be triggered
16)
17
18# Create the agent configuration
19conversation_config = ConversationalConfig(
20 agent=AgentConfig(
21 prompt=PromptAgent(
22 tools=[voicemail_detection_tool]
23 )
24 )
25)
26
27# Create the agent
28response = elevenlabs.conversational_ai.agents.create(
29 conversation_config=conversation_config
30)