- language:nodejs - sdk:compatibility - product:voice # Answering Machine Detection Answering Machine Detection (AMD) is an integral feature in any phone system. It is used to screen outbound calls to determine whether a human or machine (such as an IVR or voicemail system) answers the call. If a human answers, the call can be connected to a human agent. If a machine is detected, your system may want to end the call or leave a voicemail message. You can access the AMD feature with the [Compatibility API](/compatibility-api) which is designed to make migrating from other providers easy while giving you access to our next generation APIs and endpoints. Using the [create a call endpoint](https://docs.signalwire.com/reference/compatibility-sdks/v3/#api-reference-calls-create-a-call), you can use the Machine Detection parameter to enable AMD or, by using the DetectMessageEnd value, you can even listen for the end of a machine message. ## Creating a Call with AMD The cXML API can create an outbound call with AMD by setting certain parameters of a call to the [create a call endpoint](https://docs.signalwire.com/reference/compatibility-sdks/v3/#api-reference-calls-create-a-call). There are six applicable AMD parameters to note. - MachineDetection: Possible values are Enable, DetectMessageEnd and none. The default value is none, and machine detection is disabled. An Enable value will turn on detection and the result will be returned as soon as a machine is detected. Use this setting if you plan to hang up if a machine is detected. Setting DetectMessageEnd will wait for the end of a machines message. Use this setting to wait for a machines message to end before playing a message for their voicemail. - MachineDetectionSilenceTimeout: This is the time AMD will wait for an initial voice before returning unknown. The default is 5000 ms. _Note that this uses a different unit than the MachineDetectionTimeout._ Increasing the value may increase your chances of getting a detailed AMD result, but it may increase the determination time. - MachineDetectionSpeechThreshold: Set this time for how long SignalWire will detect speech before determining the speech is a machine. The default is 2400 ms. A human will generally have a short greeting like Hello or Hello, Dr. Whos office. This is Rose. Machine greetings are generally longer. So, anything shorter than this setting will return a human determination and anything longer will return machine. Increasing the value may reduce the chances of returning machine when it was really a human speaking. Decreasing the value may reduce the chances of returning human when it was really a machine in the case of short machine greetings, but it is better to use the following parameter to address this case. - MachineDetectionSpeechEndThreshold: After this many milliseconds of silence, the incoming speech is considered complete. This is an important parameter to use with MachineDetectionSpeechThreshold. Lets see why with an example. If a machine greeting starts with Hi, you have reached Dr. Whos office, then pauses for 1500 ms before saying Were currently traveling, so please leave a message, you want your MachineDetectionSpeechEndThreshold to be longer than 1500 to use the whole greeting speech time for your MachineDetectionSpeechThreshold measurement. The default is 1200 ms. Increasing this value does delay the time needed for detection and may result in false machine returns if a human answers, pauses, then speaks again. - MachineDetectionTimeout: This is the time SignalWire will wait for machine detection to end before timing out. The default is 30 seconds, but you may wish to increase the value when using DetectMessageEnd to account for longer voicemail greetings. You may want to decrease the value when using Enable to limit the time for detection. - MachineWordsThreshold: How many words are counted before returning a machine result, with a default value of 6 words. If more words than this value are counted, it is interpreted as a machine. Generally human greetings use fewer words than machine greetings. This setting works much like MachineDetectionSpeechThreshold. Increasing the value may reduce false machine returns in the case of a longer human greeting (such as at a business). Decreasing the value may reduce false human returns, because even short a machine message will usually be more words than a human would use. The call may look something like the following: import Tabs from @theme/Tabs; import TabItem from @theme/TabItem;