# AMD, Fallback Caller ID and DNC

> Answering-machine detection, backup caller ID with carrier failover, DNC suppression and calling-hours enforcement for Edesy voice campaigns.

Source: https://edesy.in/docs/voice-api/campaigns/amd-fallback-caller-id-and-dnc

Campaigns have three safeguards you can switch on. Answering-machine detection (AMD) records whether a human or a machine picked up. A backup caller ID on a different carrier keeps the campaign dialing when the main number's carrier refuses calls. DNC suppression removes numbers on your do-not-call list before they are ever dialed. Campaigns also only dial inside their calling window.

## Answering-machine detection

Set `amd_enabled: true` when you create the campaign. Each answered call is classified, and the verdict is stored on the contact:

| `answered_by` | Meaning |
|---|---|
| `human` | A person answered |
| `machine` | Voicemail or an answering machine |
| `unknown` | No speech, or no decision in time |

The verdict appears in the contacts list, in the results CSV (`answered_by` column) and, for agent-dialer campaigns, in `call.completed` webhook events. Use it to decide whom to call again. AMD records who answered; it does not change what the call plays.

## Fallback caller ID

```bash
curl -X PUT https://voice-api.edesy.in/v1/campaigns/{id}/fallback-number \
  -H "Authorization: Bearer $EDESY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fallback_from_number": "+9180YYYYYYYY" }'
```

- The backup number should be a number in your workspace on a different carrier from the main caller ID.
- While the main number's carrier is refusing calls, Edesy dials from the backup automatically, so the campaign keeps running.
- Send `""` to clear it.
- Set a workspace default with `PUT /v1/campaign-settings`; new campaigns use it unless you pass `fallback_from_number`.

## DNC suppression

Numbers on your do-not-call list are suppressed when contacts or leads are added. The upload response counts them as `suppressed_dnc`, and they show with status `suppressed` and a `suppression_reason` in results.

Manage the list with `/v1/dnc`. See [Blocklist and DNC](https://edesy.in/docs/voice-api/account/blocklist-and-dnc).

```bash
curl -X POST https://voice-api.edesy.in/v1/dnc \
  -H "Authorization: Bearer $EDESY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone_numbers": ["+9198XXXXXXXX"], "reason": "opt_out", "source": "ivr_press_9" }'
```

Add numbers the moment someone opts out, for example from a "press 9 to stop" option or an agent disposition.

## Calling hours

Campaigns dial only inside their window: `window_start_minute` to `window_end_minute` in the campaign's `timezone`. If you do not set a window, the default is 09:00 to 21:00. Contacts not reached when the window closes wait for the next day's window. Removing the window entirely (`"clear_window": true` on the schedule endpoint) is possible but should be reserved for calls your customers asked for.

## Consent records

Send `consent_source` and `consent_timestamp` with each contact or lead. They are stored and included in the results CSV so you can show when and where consent was given.
