

Line 5 update with a valid TwiML URL or App SID url.Line 3 update with a valid caller ID phone number.Line 2 update with a valid destination phone number.To make this script work for you, make the following updates, and then paste it into a terminal window: Once analyzed, Twilio will make an HTTP POST request to the TwiML script at, and execute the TwiML response.


This example will place an outbound call from the sender (212) 555-1234 ( +12125551234) to the phone number (310) 555-5555 ( +13105555555), and then analyze the greeting when the call is answered. u "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token" data-urlencode "MachineDetection=DetectMessageEnd" \ Here is an example of a cURL script for placing a call using the DetectMessageEnd mode for AMD: curl -X POST \ This is useful for call flows where you want to leave a voicemail. If an answering machine is detected, it will wait to return until the machine greeting is complete. DetectMessageEnd returns the initial recognition for human or fax.Enable returns results as soon as the initial recognition of human, machine, or fax is complete.MachineDetection has two possible values: To use AMD, add the MachineDetection parameter to your HTTP POST request for making an outgoing call. There is no consistent signaling difference between a call picked up by a human or a machine, so Twilio relies on analyzing the sound patterns of the greeting.įor example, a typical human greeting is much shorter than a voicemail recorded greeting, and so the length of the initial speech is a critical factor in the AMD decision. How Answering Machine Detection worksĪnswering Machine Detection (or AMD for short) listens to the answered greeting of a call, and then analyzes the audio received. Twilio has an Answering Machine Detection system which can detect if an outbound call made with Twilio's API was picked up by a human, an answering machine, or a fax machine.
