Outbound sales and notification voice bots frequently encounter answering machines, interactive voice response (IVR) phone trees, and voicemail greeting recordings.
Treating an answering machine like a live human prospect wastes call minutes and burns phone carrier reputation. Accurate Answering Machine Detection (AMD) is crucial for outbound campaign success.
+-----------------------------------------------------------------------------------+
| QUICK SUMMARY |
+-----------------------------------------------------------------------------------+
| Call Target | Acoustic Pattern | Recommended Action |
+-----------------------+------------------------------+----------------------------+
| Live Human | Short greeting ("Hello?") | Start Sales Pitch Stream |
| Answering Machine | Long greeting + 1000Hz Beep | Leave Voicemail / Hang Up |
| IVR Phone Tree | "Press 1 for Sales..." | Send DTMF Tone Signals |
+-----------------------+------------------------------+----------------------------+
The Physics of Answering Machine Detection
1. Initial Greeting Duration
Humans typically greet with short phrases lasting 1.0 to 2.5 seconds (e.g. "Hello, this is John"). Voicemail greetings usually exceed 4.0 seconds (e.g. "Hi, you have reached the voicemail of John. Please leave a message after the tone").
2. Post-Greeting Silence Window
Answering machines exhibit a distinctive silence gap right before emitting the recording beep tone.
3. Beep Tone Frequency Detection
Voicemails emit a continuous single frequency tone (typically 1000Hz for 400ms to 800ms) signaling the start of message recording.
Comparison of Detection Techniques
| Technique | Detection Speed | Accuracy | Complexity |
|---|---|---|---|
| Carrier Async AMD | 2,500ms - 4,000ms | 85% | Low (API Flag) |
| Acoustic FFT Beep Detector | Sub-300ms | 94% | Moderate (Signal Processing) |
| Real-time Neural Classifier | 1,200ms | 98.5% | High (Inference Model) |
Production Python AMD & Beep Detector (amd_engine.py)
Here is an automated Python script using greeting length heuristic analysis and FFT audio frequency analysis to detect voicemail beeps in real time.
import numpy as np
import time
class AnsweringMachineDetector:
def __init__(self, beep_freq_target: float = 1000.0, freq_tolerance: float = 50.0):
self.beep_freq_target = beep_freq_target
self.freq_tolerance = freq_tolerance
self.call_connect_time = time.time()
self.greeting_duration = 0.0
def detect_beep_tone(self, pcm_data: bytes, sample_rate: int = 16000) -> bool:
"""
Uses Fast Fourier Transform (FFT) to detect 1000Hz voicemail beep tones.
"""
samples = np.frombuffer(pcm_data, dtype=np.int16)
if len(samples) < 512:
return False
# Compute FFT power spectrum
fft_data = np.abs(np.fft.rfft(samples))
freqs = np.fft.rfftfreq(len(samples), 1.0 / sample_rate)
# Find peak frequency component
peak_idx = np.argmax(fft_data)
peak_freq = freqs[peak_idx]
peak_magnitude = fft_data[peak_idx]
# Check if peak matches target beep frequency and has high amplitude
is_beep = abs(peak_freq - self.beep_freq_target) <= self.freq_tolerance and peak_magnitude > 100000.0
return is_beep
def classify_call_target(self, is_speech_active: bool, pcm_chunk: bytes) -> str:
current_time = time.time()
elapsed_since_connect = current_time - self.call_connect_time
# Check for beep tone first
if self.detect_beep_tone(pcm_chunk):
return "VOICEMAIL_BEEP_DETECTED"
if is_speech_active:
self.greeting_duration += 0.03 # 30ms chunk accumulator
if elapsed_since_connect > 2.5:
if self.greeting_duration > 3.2:
return "MACHINE_GREETING_DETECTED"
elif 0.5 <= self.greeting_duration <= 2.2:
return "HUMAN_ANSWERED"
return "ANALYZING"
def test_amd_classifier():
amd = AnsweringMachineDetector()
# Generate 1000Hz pure sine wave simulating voicemail beep
sample_rate = 16000
t = np.linspace(0, 0.03, int(sample_rate * 0.03), False)
beep_wave = (np.sin(2 * np.pi * 1000 * t) * 15000).astype(np.int16).tobytes()
print("--- Running Answering Machine Detector Test ---")
status = amd.classify_call_target(is_speech_active=True, pcm_chunk=beep_wave)
print(f"[Audio Event Result] Status: {status}")
if __name__ == "__main__":
test_amd_classifier()
Handling Voicemail Drops & IVR Navigation
- Custom Voicemail Drop: The instant
VOICEMAIL_BEEP_DETECTEDtriggers, play a pre-recorded personalized audio message and disconnect cleanly. - Automated DTMF Keypress: If an IVR system asks to "Press 1 to speak with sales", send a dual-tone multi-frequency (DTMF) signal down the SIP track.
- Carrier Reputation Protection: Immediately hang up on unassigned numbers to maintain high carrier caller score.
How Tough Tongue AI Automates Outbound AMD
Tough Tongue AI includes enterprise AMD functionality built-in:
- Subsecond AMD Classification: Distinguishes humans from voicemails in under 1.2 seconds.
- Personalized Voicemail Drops: Automatically leaves custom messages when an answering machine is detected.
- Smart IVR Navigation: Navigates corporate phone trees using intelligent DTMF signaling.
Frequently Asked Questions
How does AMD distinguish humans from voicemails?
AMD analyzes initial greeting length (short for humans, long for recordings), silence gaps, and specific acoustic frequencies like 1000Hz recording beeps.
What is a voicemail drop?
A voicemail drop is an automated feature that detects an answering machine beep and plays a clear pre-recorded audio message without requiring live agent intervention.