DocumentationDeployment TrustContact sales
00Getting started

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.

01Requirements

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/amdcop and /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.
02Get the package

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.

ShellOn the server
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.

03Install

Run the installer.

ShellNeeds root
sudo ./install.sh

It puts things in five places and starts nothing.

  • /usr/local/bin/amdcop is the engine.
  • /etc/amdcop/amdcop.conf is the configuration file, written with defaults only if it is not already there. Upgrades never overwrite it.
  • /var/lib/amdcop/model.bin is the model.
  • /var/lib/asterisk/agi-bin/amdcop.agi is the helper your dialplan calls. It is only written if that directory exists.
  • /etc/systemd/system/amdcop.service is the service unit.
Nothing is running yet and no call is affected. The installer does not enable the service and it does not touch your dialplan or your campaigns.
04Verify

Start it and confirm it is listening.

ShellStart and check
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.

ShellHealth check
curl -s http://127.0.0.1:8370/health
Example outputIllustrative
{"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.

05Configuration

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.

/etc/amdcop/amdcop.confDefaults
[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

SettingDefaultWhat it does
listen127.0.0.1:8370Address 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.
workers4How many calls can be judged at the same moment. Raise it if concurrency is high, not because call volume is high.
log_levelinfoerror, warn, info or debug. Use debug only while you are investigating something. It is loud.
log_file/var/log/amdcop/amdcop.logWhere the per-call verdict lines go. The service also writes to the journal.
model/var/lib/amdcop/model.binPath to the model file. Point it elsewhere if you keep models on another volume.
max_analysis1200Milliseconds. The hard stop. If the engine has not decided by then it returns NOTSURE and the call carries on as a person.
min_audio240Milliseconds of audio required before any verdict is allowed. Raising it trades speed for evidence.
biasbalancedWhich mistake you would rather make. See tuning for false positives.
sample_rate8000Match what your trunks deliver. Most PSTN traffic is 8 kHz.

Reload after any change. In-flight calls finish on the settings they started with.

ShellApply a config change
sudo systemctl reload amdcop
06Running it

It is an ordinary service.

ShellDay to day
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.

Log formatOne line per call
<timestamp> call=<uniqueid> verdict=<HUMAN|MACHINE|NOTSURE|HANGUP>
           ms=<time to decide> conf=<0.00 to 1.00> cause=<short reason>
07Rolling back

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.

  1. 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.
  2. Stop the service Nothing is calling it now, but there is no reason to leave it running.
  3. Remove it, if you want the disk back The uninstaller leaves your configuration file behind so a reinstall picks up where you left off.
ShellSteps two and three
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.

08Troubleshooting

If it will not start.

What you seeUsual causeWhat to do
address already in useSomething else holds port 8370.Change listen in amdcop.conf, then reload. Check the port with ss -lntp.
starts, then exitsThe model file is missing or unreadable.Check the model path and that the service user can read /var/lib/amdcop.
dialer cannot reach itIt 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 NOTSUREIt 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 logNo 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.