Install AMDY — Standard AMD
This is the regular AMDY install — AI-powered Answering Machine Detection that returns HUMAN / MACHINE / FAS / etc. on each call, with no audio prompt played to the caller.
Want a greeting / "hello" prompt played to the caller while AMDY detects? That's the playback variant — see Playback audio (
insert.wav) instead.Need the full PDF reference? Installation & Configuration Guide (PDF)
1. Pick the installer for your system
Run the one-liner that matches your VICIdial telephony server, as root:
| Your system | Installer |
|---|---|
| Vicibox 9 / 10 / 11 / 12 | bash <(curl -s -k https://download.amdy.io/installamd.sh) |
| Vicibox 7 / 8 | bash <(curl -s -k https://download.amdy.io/installamd8.sh) |
| CentOS / AlmaLinux / Rocky Linux | bash <(curl -s https://download.amdy.io/installamdcentos.sh) |
| Ubuntu / Debian | bash <(curl -s https://download.amdy.io/installamddebian.sh) |
| Press-1 campaigns (extension 8371) | bash <(curl -s https://download.amdy.io/installamdpress1.sh) |
Each installer:
- Installs the Python dependencies (pyst2, websocket-client, mysql-connector-python, configparser)
- Downloads and unpacks the AGI script to /var/lib/asterisk/agi-bin/amd.py
- Makes it executable
- Inserts the AMDY dialplan block into /etc/asterisk/extensions.conf (extension 8370, or 8371 for Press-1)
- Reloads Asterisk
Press-1 note: Press-1 campaigns require prospects to press 1 to be connected to an agent. The 8371 extension handles that workflow. After installation, set your campaign's Routing Extension to 8371 instead of 8370.
2. Verify the install
The fastest check — confirms AGI, modules, and AMDY reachability in one command:
curl -s https://download.amdy.io/check-aiamd.sh | bash
If everything reports OK, install is good. If anything fails, see What each check-aiamd.sh failure means.
Or step through manually:
Step 1 — AMD script runs
/var/lib/asterisk/agi-bin/amd.py
The script should start and wait silently for input (this is normal AGI behaviour). No Python import errors, no missing-module messages. Press Ctrl+C to exit.
Step 2 — Python modules load
python3 -c "import websocket, mysql.connector, asterisk.agi; print('All modules loaded successfully')"
You should see:
All modules loaded successfully
If you see ImportError, re-run the installer for your OS (table above) or install manually:
pip3 install pyst2 websocket-client mysql-connector-python
3. Configure VICIdial
3.1 Enable AMD Agent Routing on the campaign
Admin → Campaigns → (your campaign) — set:
| Field | Value |
|---|---|
| AMD Type | AMD |
| AMD Agent Route Options | ENABLED |
| CPD AMD Action | DISABLED |
| CPD Unknown Action | DISABLED |
3.2 Configure the AMD Agent Route Options container
This controls which AMDY classifications are routed to an agent. Without this, machines and dead air will reach your agents.
Admin → System Settings → Container Settings — find or create the container:
| Field | Value |
|---|---|
| Container Name | AMD_AGENT_OPT_ + your campaign name (e.g. AMD_AGENT_OPT_VAC for campaign VAC, AMD_AGENT_OPT_1111 for campaign 1111) |
| Container Type | AMD_AGENT_OPTIONS |
| Container Entry | exactly HUMAN,HUMAN — no quotes, no whitespace, no other status |
PDF note: The official PDF example shows
AMD_AGENT_OPT_VACbecauseVACwas a sample campaign. The container is named after your specific campaign, not the literal stringVAC. You need one container per active campaign —check-aiamd.shlists them and flags any that are missing or misconfigured.
The HUMAN,HUMAN entry tells AMDY: only route calls classified as live humans to agents. Every other status (MACHINE, FAS, etc.) is dispositioned automatically and never wakes an agent.
3.3 Set the Routing Extension
Admin → Campaigns → (your campaign) → Dial Settings → Routing Extension:
| Routing Extension | Use for |
|---|---|
8370 |
Standard AMDY campaigns |
8371 |
Press-1 campaigns |
8369 |
Falls back to standard Asterisk AMD (no AI) — emergency only |
3.4 Rebuild telephony config
This step is mandatory. Without it, your changes don't apply and no AMDY routing happens — you'll see zero entries in the log file.
Admin → Servers → (your telephony server) → Rebuild Config (or "Generate Config"). Wait for completion.
4. First test calls
Place a few real calls (or use a click-to-call dialer test).
Watch the live log
On the telephony server:
tail -f /var/log/astguiclient/AMD_log$(date +%Y%m%d).txt
You should see one line per answered call with its classification — HUMAN lines route to agents, anything else is dispositioned.
For color-coded monitoring:
tail -f /var/log/astguiclient/AMD_log$(date +%Y%m%d).txt | sed -u \
-e '/AUDIO/s/.*/\o033[31m&\o033[m/' \
-e '/HUMAN/s/.*/\o033[32m&\o033[m/'
Red = audio/machine, green = human.
Log format
Each line is pipe-delimited:
- Timestamp — when the detection happened
- Unique ID — call identifier (use this to pull the recording later)
- Detection result — HUMAN / MACHINE / FAS / etc., with confidence scores
- Campaign info — which campaign + dial config produced the call
- Phone number — destination number (partially masked for privacy)
5. If something doesn't work
Run the one-shot check first — it tells you exactly which subsystem is broken:
curl -s https://download.amdy.io/check-aiamd.sh | bash
Then jump to the right page:
| Symptom | Guide |
|---|---|
| No log entries appear / every call routes to an agent / module errors | Setup & installation problems |
connection error, processing error, NO AUDIO, status=403 |
Connection problems |
| Voicemails reaching agents / accuracy looks wrong | Detection accuracy |
| Agents report early hangups, silent prospects, "scam call" labels | Agent & call experience |
| Need to look at specific calls | Recording Review Portal — see Detection accuracy for the export workflow |
6. Quick reference — what got installed
| File / location | Purpose |
|---|---|
/var/lib/asterisk/agi-bin/amd.py |
The AGI script that runs on every call to talk to AMDY |
/var/log/astguiclient/AMD_log<YYYYMMDD>.txt |
Daily AMD log with one line per call |
Extension 8370 in /etc/asterisk/extensions.conf |
Dialplan block that routes calls through AMDY |
Extension 8371 (Press-1 only) |
Same as 8370 but for Press-1 campaigns |
Container AMD_AGENT_OPT_<campaign> in VICIdial |
Controls which classifications go to agents |
See also
- Installation & Configuration Guide (PDF) — official document
- Cheat sheet — scripts & commands — all install / verify / connectivity one-liners in one page
- Playback audio (
insert.wav) — install the variant that plays a greeting during detection - Setup & installation problems — what to do when something goes wrong
- Understanding AMD statuses & timing — what HUMAN / MACHINE / FAS / etc. mean