Voicemail Tool

Learn how to use the assistant-controlled voicemail tool for flexible voicemail handling

Beta Feature: The voicemail tool is currently in beta. Features and behavior may change as we continue to improve this functionality based on user feedback.

Overview

The voicemail tool gives your assistant direct control over when and how to leave voicemail messages. Unlike automatic voicemail detection, which operates independently of your assistant, this tool allows your assistant to decide when it’s reached a voicemail system and leave a configured message.

Key benefits:

  • Maximum flexibility - Assistant decides when and what to say
  • Cost-effective - Only triggers when needed
  • Context-aware - Messages can be customized based on conversation
  • Simple integration - Works like other built-in tools

How it works

When you add the voicemail tool to your assistant:

  1. Your assistant listens for voicemail indicators (greetings mentioning “unavailable”, “leave a message”, etc.)
  2. Upon detecting voicemail, the assistant calls the tool
  3. The tool delivers your configured message
  4. The call ends automatically after message delivery

This approach differs from automatic voicemail detection, which detects voicemail at the system level. The voicemail tool puts detection and response entirely in the assistant’s hands.

Configuration

Add the voicemail tool to your assistant’s tools array:

1{
2 "model": {
3 "provider": "openai",
4 "model": "gpt-4o",
5 "messages": [
6 {
7 "type": "system",
8 "content": "You are a sales representative for Acme Corp. If at any point you determine you're speaking to a voicemail system (greeting mentions 'unavailable', 'leave a message', 'voicemail', etc.), immediately use the leave_voicemail tool."
9 }
10 ],
11 "tools": [
12 {
13 "type": "voicemail",
14 "function": {
15 "name": "leave_voicemail",
16 "description": "Leave a voicemail message when you detect you've reached a voicemail system"
17 },
18 "messages": [
19 {
20 "type": "request-start",
21 "content": "Hi, this is {{company}}. {{message}}. Please call us back at {{phone}}."
22 }
23 ]
24 }
25 ]
26 }
27}

Message Configuration

Define the voicemail message in the tool configuration:

1{
2 "messages": [
3 {
4 "type": "request-start",
5 "content": "Hi, this is {{company}}. {{message}}. Please call us back at {{phone}}."
6 }
7 ]
8}

Use template variables like {{company}}, {{message}}, and {{phone}} to make your voicemail messages dynamic while keeping them consistent.

Advanced Examples

Dynamic voicemail with context

1{
2 "model": {
3 "provider": "openai",
4 "model": "gpt-4o",
5 "messages": [
6 {
7 "type": "system",
8 "content": "You are calling leads about their recent inquiry. If you reach voicemail, use the leave_voicemail tool and mention their specific interest."
9 }
10 ],
11 "tools": [
12 {
13 "type": "voicemail",
14 "function": {
15 "name": "leave_voicemail",
16 "description": "Leave a personalized voicemail message"
17 },
18 "messages": [
19 {
20 "type": "request-start",
21 "content": "Hi {{customer_name}}, this is {{agent_name}} from {{company}} following up on your inquiry about {{product_interest}}. I'd love to discuss how we can help. Please call me back at {{callback_number}} or I'll try you again tomorrow. Thanks!"
22 }
23 ]
24 }
25 ]
26 }
27}

Best Practices

Detection prompting

Be specific about voicemail indicators in your system prompt:

  • “unavailable”
  • “leave a message”
  • “voicemail”
  • “at the tone”
  • “beep”

Message structure

Keep voicemail messages:

  • Brief - Under 30 seconds
  • Clear - State name, company, and purpose
  • Actionable - Include callback number or next steps
  • Professional - Match your brand voice

Error handling

Consider edge cases:

  • Long voicemail greetings
  • Voicemail box full scenarios
  • Systems requiring keypad input

Voicemail Tool vs. Automatic Detection

FeatureVoicemail ToolAutomatic Detection
ControlAssistant-drivenSystem-driven
FlexibilityHigh - custom logicMedium - predefined behavior
CostLower - only when usedHigher - continuous monitoring
Setup complexitySimple - just add toolModerate - configure detection
Message customizationFull controlLimited to configured message
Detection accuracyDepends on promptProvider-specific (Vapi, Google, etc.)

Choose the voicemail tool when you need maximum flexibility and cost efficiency. Choose automatic detection when you need guaranteed system-level detection without relying on assistant prompting.

Common Use Cases

  • Sales outreach - Personalized follow-up messages
  • Appointment reminders - Leave detailed appointment information
  • Customer service - Callback scheduling with ticket numbers
  • Lead qualification - Leave targeted messages based on lead data

Next steps