osmTalk Docs
Agents

Voicemail Detection

Auto-detect answering machines on outbound calls and save credits.

On outbound calls, ~40% of calls go to voicemail. Without detection, your agent talks to an answering machine for 60+ seconds before noticing — burning credits. With voicemail detection enabled, the bot classifies the first few seconds of audio and either:

  • Hangs up quickly, OR
  • Leaves a pre-configured voicemail message

When to Use

ScenarioEnable?
Outbound phone calls (lead follow-up, appointment reminders, collections)✅ Yes
Inbound calls❌ No (inbound callers are always live humans)
Web / widget calls❌ No (browsers don't have voicemail)
WhatsApp voice calls❌ No

Example 1: Silent Hang-Up on Voicemail

Goal: your agent makes outbound lead-qualification calls. If it reaches voicemail, hang up silently (don't leave a message — you'll retry later).

Step 1 — Enable in advanced settings

SettingValue
Enable Voicemail DetectionON
Voicemail Response Delay2.0 s
Voicemail Message(leave empty)

Step 2 — What happens on a voicemail call

[Call connects]
[Voicemail plays: "Hi, you've reached Priya. I can't come to the phone right now..."]
[Bot waits 2 seconds, GPT-4o-mini classifies audio as "voicemail"]
[Bot silently hangs up — call ends in ~3 seconds, costs minimal credits]

Step 3 — What happens on a human call

[Call connects]
[Human says: "Hello?"]
[Bot waits 2 seconds, GPT-4o-mini classifies audio as "conversation"]
[Bot proceeds normally with its welcome message]

Example 2: Leave a Voicemail Message

Goal: collections reminder — if you reach voicemail, leave a polite note asking them to call back.

Settings

SettingValue
Enable Voicemail DetectionON
Voicemail Response Delay2.5 s
Voicemail MessageHi, this is an automated reminder from BlueBank. Your monthly EMI payment of ₹5,000 was due on the 15th. Please call us back at 1-800-123-4567 or visit our app to pay. Thank you.

What the voicemail hears

Voicemail beep
Bot: "Hi, this is an automated reminder from BlueBank. Your monthly EMI payment of ₹5,000 was due on the 15th. Please call us back at 1-800-123-4567 or visit our app to pay. Thank you."
[Bot hangs up after speaking]

Tips for voicemail messages

  • Keep under 30 seconds — most voicemails cut off at 30-60s
  • Include a callback number — voicemail recordings don't support tools
  • Say the company name first — caller might skip otherwise
  • No markdown — TTS reads **bold** as "asterisk bold asterisk"

Example 3: Appointment Reminders

Goal: confirm dental appointment 24 hours in advance. Try to get a live confirmation, but if voicemail, leave the reminder.

Settings

SettingValue
Enable Voicemail DetectionON
Voicemail Response Delay2.0 s
Voicemail MessageHi, this is a reminder from Dr. Sharma's clinic. Your appointment is tomorrow at 3:00 PM. If you need to reschedule, please call 080-4567-8900. See you tomorrow!

Outcomes

Call resultWhat happens
Live human picks upBot asks "Calling from Dr. Sharma's clinic to confirm your 3 PM appointment tomorrow. Can you make it?"
VoicemailBot waits for the beep, then reads the voicemail message
No answer / busySIP returns failure — bot exits after the dial-timeout

How It Works

  1. On call connect, the bot listens for 1-3 seconds of audio
  2. Audio is transcribed by Deepgram STT
  3. The transcribed text is sent to gpt-4o-mini with a classifier prompt
  4. Classifier returns "voicemail" or "conversation"
  5. If "voicemail":
    • Plays the configured message (if set)
    • Waits for the message to finish speaking (max 15s)
    • Sends SIP BYE to end the call
  6. If "conversation":
    • Proceeds with the agent's normal welcome message + pipeline

Classification typically adds 1-2 seconds of silence at the start of human calls. Worth it for the 40%+ credit savings on voicemail calls.


Cost & Credit Savings

Per-call cost comparison (typical 90-second TTS-heavy call):

Without detectionWith detection
Voicemail call: ₹8 wasted (bot talks to machine for 60s before noticing)Voicemail call: ₹0.50 (3s of GPT-4o-mini classification)
Human call: ₹12Human call: ₹12.50 (+ ₹0.50 classification)

At 1000 outbound calls/day with 40% voicemail rate:

  • Without: 1000 × (0.4 × ₹8 + 0.6 × ₹12) = ₹10,400/day
  • With: 1000 × (0.4 × ₹0.50 + 0.6 × ₹12.50) = ₹7,700/day
  • Savings: ₹2,700/day = ~₹81k/month

Prerequisites

  • OpenAI API key must be configured (used for GPT-4o-mini classification, separate from your agent's LLM)
  • Outbound phone channel — voicemail detection only runs when channel == "phone"

Troubleshooting

ProblemLikely causeFix
Classifier always says "conversation"Voicemail Response Delay too shortIncrease to 3-4 seconds
Classifier always says "voicemail"Call connects with long ringback toneVerify SIP provider strips ringback before audio
Voicemail message cut offMessage too longKeep under 15 seconds of spoken text
Bot speaks before voicemail beepDelay too short (beep hasn't played yet)Increase Voicemail Response Delay to 2.5-3s
"VoicemailDetector not available" in logsosmTalk voicemail module not installed in this buildRebuild the bot with the voicemail extra enabled, or contact support

Configuration Reference

SettingKeyDefaultDescription
Enable Voicemail DetectionenableVoicemailDetectionfalseMaster toggle
Voicemail Response DelayvoicemailResponseDelay2.0 (seconds)Wait before classifying
Voicemail MessagevoicemailMessage"" (empty)What to say if voicemail detected. Empty = hang up silently

Only applies when the call channel is phone and outbound.