SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Resolving Twilio Voice Unfetched TwiML Webhooks With AMD Enabled

Issue

Some Twilio Programmable Voice users may encounter a scenario where outbound calls (created via the REST API with an explicit url parameter for TwiML) are completed successfully, but the webhook (Voice URL) is never fetched. This can be confirmed by the absence of a corresponding GET/POST entry in the Twilio Request Inspector and by server logs showing no incoming request from Twilio.

This article explains a common cause for this behavior when Answering Machine Detection (AMD) is enabled, and provides guidance on how to resolve it.

Symptoms

  • Outbound calls show a final status of "Completed" with a normal/expected duration.
  • The webhook (Voice URL) provided at call creation is never requested by Twilio.
  • No corresponding request appears in the Twilio Request Inspector.
  • Server logs confirm no incoming HTTP request from Twilio for the affected calls.
  • The issue is intermittent and not tied to a specific hosting provider or destination IP.

 

Product

Programmable Voice

 

Environment

Twilio Console

 

Cause

This behavior is often related to the configuration of Answering Machine Detection (AMD) on the call, specifically when:

  • MachineDetection is enabled,
  • AsyncAmd is set to false (the default),
  • MachineDetectionTimeout is set (e.g., 30 seconds).

How it works
When AsyncAmd is false, Twilio blocks the call and waits for AMD to complete before invoking your webhook (Voice URL). If the callee hangs up before AMD finishes (for example, after 23 seconds while the timeout is 30 seconds), Twilio will not trigger your webhook, as the call ends during the detection phase. This is expected behavior for synchronous AMD.

 

Example Scenario

  • Outbound call is placed with AMD enabled, AsyncAmd=false, and MachineDetectionTimeout=30.
  • The callee answers, but hangs up after 23 seconds.
  • Twilio is still waiting for AMD to complete (has not yet reached the webhook).
  • The call ends before AMD completes, so the webhook is never triggered.

 

Resolution

To ensure your webhook is always triggered, consider the following options:

  1. Set AsyncAmd to true:
    • This allows Twilio to immediately invoke your webhook after the call is answered. AMD results are sent asynchronously via a status callback.
    • Learn more about Async AMD
  2. Reduce MachineDetectionTimeout:
    • Lowering the timeout value means Twilio will reach your webhook sooner if the callee answers, reducing the window where the call could end before the webhook is triggered.

 

Additional Information

  • This behavior is not caused by carrier issues or problems with your webhook URL.
  • It is a result of how synchronous AMD (AsyncAmd=false) is designed to work.
  • If you require the webhook to be triggered regardless of AMD completion, using asynchronous AMD is recommended.

Below you will find references to useful documents:

 

Summary Table

Setting Synchronous (AsyncAmd=false) Asynchronous (AsyncAmd=true)
Webhook Trigger Timing After AMD completes Immediately after answer
Risk of Missed Webhook Higher (if call ends early) Lower
AMD Result Delivery Before webhook Via status callback

If you have further questions or need help adjusting your AMD settings, please reach out to Twilio Support.

Have more questions? Submit a request
Powered by Zendesk