# 21234: Invalid Machine Detection configuration value

Log Level: ERROR

## Description

Twilio returns this error when the `MachineDetection` value in a Voice request is not one of the supported AMD values, or when one of the optional AMD tuning parameters falls outside its allowed range. AMD is supported on the Calls API, Participants API, `<Dial><Number>`, and `<Dial><Sip>`.

### Possible causes

* `MachineDetection` is set to a value other than `Enable` or `DetectMessageEnd`.
* One or more AMD tuning parameters is outside its allowed range: `MachineDetectionTimeout`, `MachineDetectionSpeechThreshold`, `MachineDetectionSpeechEndThreshold`, or `MachineDetectionSilenceTimeout`.

### Possible solutions

* Set `MachineDetection` to `Enable` for early human or machine detection, or to `DetectMessageEnd` if you need to wait for the end of a voicemail greeting.
* Keep AMD tuning parameters within their supported ranges: `MachineDetectionTimeout` between `3` and `59`, `MachineDetectionSpeechThreshold` between `1000` and `6000`, `MachineDetectionSpeechEndThreshold` between `500` and `5000`, and `MachineDetectionSilenceTimeout` between `2000` and `10000`.

#### Additional resources

* [Answering Machine Detection](/docs/voice/answering-machine-detection)
* [Programmable Voice API Overview](/docs/voice/api)
