Install it.
One package, one configuration file, one service. Nothing leaves your network, nothing needs new hardware, and nothing on your floor changes until you point a campaign at it.
What the server needs.
- Linux, 64 bit. Anything with systemd. The same box as your dialer is fine.
- Root or sudo. The installer writes to
/usr/local/bin,/etc/amdcopand/var/lib/amdcop. - A free TCP port. The default is 8370. Change it if that port is taken.
- Disk for the model file. It sits in
/var/lib/amdcop. - No GPU. The engine runs on CPU. Size it against calls being judged at the same moment, not against total call volume.
Download and unpack.
Pull the release onto the server and unpack it. Use the download host we give you in place of the placeholder below.
curl -fsSLO https://downloads.amdcop.example/amdcop-latest.tar.gz tar -xzf amdcop-latest.tar.gz cd amdcop
The archive holds the engine binary, the model file, the AGI helper for Asterisk, a default configuration file and the installer.
Run the installer.
sudo ./install.sh
It puts things in five places and starts nothing.
/usr/local/bin/amdcopis the engine./etc/amdcop/amdcop.confis the configuration file, written with defaults only if it is not already there. Upgrades never overwrite it./var/lib/amdcop/model.binis the model./var/lib/asterisk/agi-bin/amdcop.agiis the helper your dialplan calls. It is only written if that directory exists./etc/systemd/system/amdcop.serviceis the service unit.
Start it and confirm it is listening.
sudo systemctl enable --now amdcop systemctl status amdcop sudo ss -lntp | grep amdcop
Then ask the service how it is doing. A healthy engine answers on the same port it listens for calls on.
curl -s http://127.0.0.1:8370/health
{"status":"ok","model":"loaded","listen":"127.0.0.1:8370"}If the status is anything other than ok, the reason is in the log. See
if it will not start below.
One file, and most of it you can leave alone.
Everything lives in /etc/amdcop/amdcop.conf. The defaults are written for a
single dialer on the same host. The two settings worth knowing are
max_analysis and bias.
[service] listen = 127.0.0.1:8370 workers = 4 log_level = info log_file = /var/log/amdcop/amdcop.log [detection] model = /var/lib/amdcop/model.bin max_analysis = 1200 ; ms. Hard stop. Past this the verdict is NOTSURE. min_audio = 240 ; ms of audio required before any verdict is allowed bias = balanced ; balanced | favour-human | favour-machine [audio] sample_rate = 8000 channels = 1
The default port, 8370, is the same number as the dialplan extension you will add on the VICIdial page. That is only a memory aid. They are unrelated and either can be changed on its own.
Settings reference
| Setting | Default | What it does |
|---|---|---|
| listen | 127.0.0.1:8370 | Address and port the engine accepts calls on. Use loopback when the dialer is on the same host. Otherwise bind the interface the dialer can reach and firewall it to that host. |
| workers | 4 | How many calls can be judged at the same moment. Raise it if concurrency is high, not because call volume is high. |
| log_level | info | error, warn, info or debug. Use debug only while you are investigating something. It is loud. |
| log_file | /var/log/amdcop/amdcop.log | Where the per-call verdict lines go. The service also writes to the journal. |
| model | /var/lib/amdcop/model.bin | Path to the model file. Point it elsewhere if you keep models on another volume. |
| max_analysis | 1200 | Milliseconds. The hard stop. If the engine has not decided by then it returns NOTSURE and the call carries on as a person. |
| min_audio | 240 | Milliseconds of audio required before any verdict is allowed. Raising it trades speed for evidence. |
| bias | balanced | Which mistake you would rather make. See tuning for false positives. |
| sample_rate | 8000 | Match what your trunks deliver. Most PSTN traffic is 8 kHz. |
Reload after any change. In-flight calls finish on the settings they started with.
sudo systemctl reload amdcop
It is an ordinary service.
sudo systemctl restart amdcop # after an upgrade sudo systemctl stop amdcop # take it out of service sudo journalctl -u amdcop -f # watch verdicts as they land
The verdict log carries one line per call. The fields are fixed, so it is easy to feed into whatever you already collect logs with.
<timestamp> call=<uniqueid> verdict=<HUMAN|MACHINE|NOTSURE|HANGUP>
ms=<time to decide> conf=<0.00 to 1.00> cause=<short reason>Taking it off is three commands.
Installing AMD Cop changes nothing about how your dialer behaves. Until a campaign points at it, the service sits idle. So the order matters: put the campaign back first, then deal with the service at your leisure.
- Point the campaign back Set the campaign's routing extension back to 8369. This is the only step that touches live traffic, and it is covered on the VICIdial page.
- Stop the service Nothing is calling it now, but there is no reason to leave it running.
- Remove it, if you want the disk back The uninstaller leaves your configuration file behind so a reinstall picks up where you left off.
sudo systemctl disable --now amdcop sudo ./install.sh --uninstall
There is no database to migrate and no schema to unpick. Your lists, recordings, dispositions and reports were never touched.
If it will not start.
| What you see | Usual cause | What to do |
|---|---|---|
| address already in use | Something else holds port 8370. | Change listen in amdcop.conf, then reload. Check the port with ss -lntp. |
| starts, then exits | The model file is missing or unreadable. | Check the model path and that the service user can read /var/lib/amdcop. |
| dialer cannot reach it | It is bound to loopback and the dialer is on another host. | Set listen to an interface the dialer can reach, then firewall that port to the dialer only. |
| every call returns NOTSURE | It is not being given audio, or min_audio is longer than the audio it gets. | Confirm the extension answers the call before it hands over. Then lower min_audio. |
| nothing in the log | No campaign is pointed at it yet. | Expected. The service is idle until a campaign routes to it. |
Still stuck? Send us the output of journalctl -u amdcop -n 200 and the
contents of your config file. Get in touch.