When running outbound call campaigns, one of the biggest time-wasters is reaching voicemail when you intended to speak to a real person. Answering Machine Detection (AMD) solves this by automatically identifying whether a human or a machine picked up.
What is AMD?
AMD analyzes the audio at the beginning of a call and classifies the answer as:
- human — a live person answered
- machine_start — a voicemail greeting is playing
- machine_end_beep — the beep after a voicemail greeting (ready to record)
- fax — a fax machine answered
Sync vs Async AMD
- Sync AMD — the call waits for detection before fetching your XML. Adds 2–5s of silence.
- Async AMD (recommended) — the call connects immediately and AMD runs in the background. Result is POSTed to
AsyncAmdStatusCallback.
Using Async AMD with Wirexa API
call = client.calls.create(
to="+15551234567",
from_="+15559876543",
url="https://your-backend.com/voice",
machine_detection="Enable",
async_amd=True,
async_amd_status_callback="https://your-backend.com/amd",
)Your /amd endpoint receives the result a few seconds after the call connects:
@app.route('/amd', methods=['POST'])
def amd_result():
answered_by = request.form.get('AnsweredBy')
call_sid = request.form.get('CallSid')
if answered_by == 'human':
xml = '<Response><Say>Hello! We have an important update.</Say></Response>'
elif 'machine' in answered_by:
xml = '<Response><Hangup/></Response>'
else:
xml = '<Response><Hangup/></Response>'
return Response(xml, mimetype='text/xml')Best practices
- Always use async AMD to avoid dead air at the start of calls
- Set a short initial greeting in
/voicewhile AMD runs (e.g. 'Please hold...') - Log
MachineDetectionDurationto monitor detection speed - For voicemail campaigns, use
machine_end_beepto start recording after the beep
Conclusion
AMD is essential for any outbound call operation. With Wirexa API's async mode, you get detection results without adding latency to your calls.
Explore the full AMD documentation or contact us to get started.