ViciDial

Built for ViciDial. Answers in its own terms.

AMD Cop sets the same AMDSTATUS and AMDCAUSE ViciDial reads after Asterisk's AMD, so your routing, voicemail drop and statuses keep working as they are.

Before you start

What the server needs.

DialerViciDial on Asterisk 13 or newerViciBox 7 to 12 are fine. In a cluster, install on every server that places calls.
AccessRoot on each of those servers
Python3.6 or newer, which ViciBox already hasNothing is installed with pip.
NetworkOutbound to api.amdcop.ai on 443, and to the detection endpointHosts and ports
Install

One command, as root.

curl -fsSL https://api.amdcop.ai/connector.sh | sudo bash -s amdcop_live_your_key

The portal gives you the command with your key in it. To see what it would change first, run it with AMDCOP_DRY_RUN=1. When it finishes, the server registers itself with your account, and the portal's checklist shows each step.

What it changes

Only the dialplan lines it shows you.

Your dialerWhat the installer doesWhat you change in ViciDial
Asterisk has AudioSocket() and 8370 is freeTakes over: an 8370 context that is your 8369 with AMD() replaced by AMD Cop; your original 8369 is kept for rollback, and 8369 points at 8370Nothing
Anything else, such as ViciBox's Asterisk 13 or another AMD on 8370Installs beside, on 8371 or the next free extension, and changes nothing elsePoint a campaign's Routing Extension at the extension the portal shows

It adds its scripts to agi-bin (all named amdcop_*), its settings to /etc/amdcop, a small service that sends call records to the portal, and the doctor and the uninstaller in /usr/local/lib/amdcop, which only root can change. It never writes to the ViciDial database and never edits a campaign.

Campaign settings

The settings stock AMD needs.

Campaign settingValue
Routing Extension8369 after a take-over, or the extension the portal shows after a beside install
AMD TypeAMD
CPD AMD ActionDISABLED
AMD Agent Route OptionsDISABLED

Leave AMD Agent Route Options at DISABLED if you can. With it ENABLED, a settings container named AMD_AGENT_OPT_ and the campaign decides which status and cause pairs reach an agent, and every other call is hung up. AMD Cop's causes start with the status (HUMAN-AMDCOP), so a container holding HUMAN,HUMAN, as AMDY asks for, lets AMD Cop's people through. Add the line NOTSURE,NOTSURE too: without it, the calls AMD Cop is not sure of are hung up, and during an outage on our side so is every call, people included.

Test it

Two calls tell you it works.

  1. From a campaign that uses AMD Cop, call your own mobile and answer with a normal "Hello?". It should reach an agent, and the portal shows Human.
  2. Call a number you know goes to voicemail. No agent should hear it, and the portal shows Machine.

Something wrong? Run the doctor on the server, sudo /usr/local/lib/amdcop/doctor.py: it checks every part of the install, one line each, and its output is safe to paste to us. Troubleshooting

Installed before connector 1.5.0? Run the install command again first. It upgrades in place and keeps your extension and settings. Until then the doctor and the uninstaller are in /etc/amdcop/, where they should not be run with sudo.

Roll back

One command takes it out.

sudo /usr/local/lib/amdcop/uninstall.sh

It restores your original 8369, removes every file the installer added, stops the call-record sender and deletes its spool. Your key stays valid until you revoke it in the portal. After a beside install you can also just point the campaign back at its old extension. Every status and cause AMD Cop sets

Try it on one server.

Sign up, copy the command from the portal, and watch the checklist tick off each step. The Sandbox is free for 50,000 calls a month.