← Back to Blog

Answering Machine Detection (AMD): What It Is and How to Use It

Learn what answering machine detection (AMD) is, how it works, and how to use it in your voice API calls to skip voicemails and improve live answer rates.

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 /voice while AMD runs (e.g. 'Please hold...')
  • Log MachineDetectionDuration to monitor detection speed
  • For voicemail campaigns, use machine_end_beep to 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.

Ready to build with Wirexa API?

Get your API credentials and make your first call in minutes.

Request access →