LexoAMD user guide

How to connect your dialer to LexoAMD, set up campaigns, read the results and use the portal. Written for call center admins and the engineers who run the dialer servers

Client version 2.0 · Updated November 2026

What LexoAMD does

LexoAMD listens to the first seconds of every answered outbound call and tells your dialer who picked up, usually within 2 to 3 seconds. Live people go to your agents. Everything else is handled like an answering machine, so agents stop wasting time on calls nobody will talk on.

1Call is answeredThe dialer sends the call audio to LexoAMD over a secure connection
2LexoAMD listensIt checks the audio every half second and decides as soon as it is sure
3Verdict returnsHuman, Machine, FAS or Honeypot, with the time it took
4Dialer routesHumans go to an agent, the rest follow your machine handling
ResultMeaning
HUMANA live person answered
MACHINEVoicemail or an answering machine greeting
FASFalse answer supervision: the carrier marked the call as answered but you hear ringing, silence, a network tone or a recorded announcement. You pay for minutes nobody is on
HONEYPOTA fake-answer number that plays the same recording to every caller to inflate your carrier cost. LexoAMD flags it when the same recording is heard on several different numbers
NOTSURENot enough audio to decide (for example the call hung up immediately)

LexoAMD never drops a call it believes could be a live person. When in doubt, the call goes to an agent.

Before you start

You need three things:

  1. A LexoAMD account. Your account manager creates it and sends you the portal address, your email and a password. Sign in at amd.lexogenix.com and change the password under Account.
  2. An API key for each dialer server. It starts with lxa_ and is shown in the portal under API and dialers. You can restrict a key to your dialer's public IP addresses.
  3. Root access to the dialer server, with outbound HTTPS (port 443) allowed to amd.lexogenix.com. No inbound ports are needed.
Keep your API key private. Anyone with the key can send calls on your account. If a key leaks, disable it in the portal and create a new one.

Supported systems

The LexoAMD client needs no extra packages. It comes in two versions, one for Python and one for Perl, and the installer picks whichever works on your server. Every VICIdial server has Perl, because VICIdial itself is written in Perl.

ComponentSupported versions
VICIdialAny version with VD_amd.agi and the campaign setting AMD Agent Route Options. This covers every VICIdial on ViciBox 8 and later, and current scratch installs
ViciBox8, 9, 10, 11, 12 and later
Other LinuxCentOS / RHEL 6, 7, 8, 9 · AlmaLinux · Rocky Linux · Debian · Ubuntu · openSUSE
Asterisk1.8 and later, including 11, 13, 16, 18, 20, 21 and 22
Python2.6, 2.7 and every 3.x release (tested up to 3.14)
Perl5.8 and later (tested 5.10 to 5.44). Uses IO::Socket::SSL or the standard openssl command for the secure connection

Staying compatible after upgrades

  • The client uses only the standard library of Python or Perl, so new Python and Perl releases do not break it.
  • When a call starts, the client uses the runtime that passed the test at install time. If that runtime is later removed, for example Python 2 during an OS upgrade, it switches to another Python or to Perl automatically.
  • If the client cannot run or cannot reach LexoAMD, the call falls back to the stock Asterisk AMD, so calls are never left without a decision.
  • After a major upgrade (new ViciBox release, new Asterisk), run the install command again. It is safe to run any number of times.

Install on a VICIdial dialer

Run this as root on every dialer server that places calls. Replace <API_KEY> with your key from the portal.

curl -fsSL https://amd.lexogenix.com/install.sh | bash -s -- <API_KEY>

The installer takes under a minute and prints each step:

  1. Download clientsSaves lexo_amd.py and lexo_amd.pl to /var/lib/asterisk/agi-bin/.
  2. ConfigWrites your key to /etc/lexo-amd/client.conf, readable only by root and Asterisk.
  3. Pick a runtimeTries Python 3, Python 2 and Perl in turn, makes a live test connection with each, and keeps the first one that connects. The test is not counted as a call.
  4. DialplanBacks up /etc/asterisk/extensions.conf, then adds a new extension 8375 right after the stock 8369. Your existing extensions, including 8369, 8370 and any custom ones, are not changed.
  5. ReloadReloads the Asterisk dialplan. Calls in progress are not affected.

If your server cannot download with curl (very old CentOS 6), download https://amd.lexogenix.com/install.sh on another machine, copy it over, and run bash install.sh <API_KEY>.

Several dialer servers? Run the same command on each one. You can use one key for all of them, or one key per server to see each server separately in the portal.

Set up a campaign

In the VICIdial admin, open Campaigns and choose the campaign, then:

  1. Routing ExtensionSet it to 8375. This sends answered calls through LexoAMD. Setting it back to 8369 returns the campaign to stock AMD at any time.
  2. AMD Agent Route OptionsSet it to ENABLED.
  3. Settings containerCreate or edit the container AMD_AGENT_OPT_<campaign id> and list the results that should reach an agent, one per line:
    HUMAN,HUMAN
    To also send calls LexoAMD was unsure about to agents, add a line NOTSURE,NOTSURE.
  4. SaveThe change applies to the next calls the campaign places.
Start with one campaign. Run it for a day, listen to a sample of calls on the Detections page, then move the other campaigns over.

Machine, FAS and honeypot calls follow the machine handling the campaign already has, such as status AA or a voicemail drop message. You do not need to change it.

Results and routing

LexoAMD sets the same dialplan variables as the stock Asterisk AMD, so VICIdial reads them without changes:

What was heardAMDSTATUSAMDCAUSEWhat VICIdial does
Live personHUMANHUMANSends the call to an agent
VoicemailMACHINEMACHINEMachine handling
False answerMACHINEFASMachine handling
Honeypot numberMACHINEHONEYPOTMachine handling
Not enough audioNOTSURENOTSURE or NO_AUDIOPer your AMD_AGENT_OPT container
LexoAMD unreachableCONNECTION_ERROR or PROCESSING_ERRORStock Asterisk AMD decides instead

AMDSTATS holds the raw verdict, for example MACHINE-2.50-0.9912: the result, the second it was decided at, and the confidence.

Check that it works

  1. Test the connection from the dialer:
    /var/lib/asterisk/agi-bin/lexo_amd.agi --test
    It prints ok … reply=NOTSURE-0.00-0.0000 when the key and network are fine.
  2. Watch live decisions in the Asterisk console:
    asterisk -rvvv | grep LexoAMD
    Each answered call prints a line such as LexoAMD: HUMAN/HUMAN HUMAN-2.56-0.9675.
  3. Open Detections in the portal. Every call appears within a second, with a play button to hear exactly what LexoAMD heard.

Update or remove

Update: run the install command again. It replaces the client, keeps your key and your dialplan, and makes a new backup of extensions.conf.

Remove:

curl -fsSL https://amd.lexogenix.com/install.sh | bash -s -- --uninstall

This removes extension 8375, the client and its config, and keeps a backup of extensions.conf. Before removing, set every campaign's Routing Extension back to 8369.

Using the portal

Sign in at amd.lexogenix.com. You see only your own company's calls and data.

PageWhat it is for
OverviewCalls in the last 24 hours by result, an hourly chart and a 30-day trend
DetectionsEvery call with its number, result, decision time and confidence. Filter by result or search a number. Press play to listen to the call audio
Test a recordingUpload any recording and see what LexoAMD would decide, with the moment of the decision marked on the waveform
Send recordingsUpload recordings in bulk and label them Human, Machine, FAS or Honeypot
Import call reportUpload a VICIdial call export (CSV) with its recordings. The dispositions become labels automatically
My recordingsRecordings you sent and whether they were accepted for training
API and dialersCreate, restrict and disable API keys, and copy the install command
AccountChange your password

Every list is paged on the server, so pages stay fast as your call history grows. Use the light and dark switch at the bottom of the sidebar.

Improving accuracy

LexoAMD learns from real calls. The most useful thing you can do is send examples from your own traffic, especially calls you think it got wrong:

  • On Detections, listen to calls and note any wrong ones.
  • On Send recordings, upload those recordings with the correct label. Honeypot and FAS examples are especially valuable.
  • Or import a VICIdial call report with recordings. Calls dispositioned as answering machine become Machine examples, and so on.

The LexoAMD team reviews what you send and retrains the model regularly. A new model only goes live if it is at least as accurate as the current one on a fixed test set, so updates never make results worse.

Other dialers: WebSocket API

Any dialer that can stream call audio over a WebSocket can use LexoAMD, for example FreeSWITCH with mod_audio_fork, LiveKit or your own software.

URL      wss://amd.lexogenix.com/v1/detect
Header   X-API-Key: <API_KEY>

1. Send one text frame with the call settings:
   {"config":{"sample_rate":8000,"encoding":"pcm16","call_id":"123","phone":"15551234567","max_detection_time":6}}
     sample_rate  8000 or 16000
     encoding     pcm16 (16-bit little endian), mulaw or alaw
     phone        the dialed number (used for honeypot detection; optional but recommended)

2. Stream the answered call's audio as binary frames, 20 ms to 1 s each.

3. After each frame LexoAMD replies with a text frame:
     ""                      keep streaming
     HUMAN-2.56-0.9675       decision: RESULT-SECONDS-CONFIDENCE

4. To force a decision (call ended), send {"eof":1}.

Results are HUMAN, MACHINE, FAS, HONEYPOT or NOTSURE. Stop sending audio once you have a decision and close the connection. A wrong key or a blocked IP closes the connection with code 1008.

Minimal example (Python)

import json, websocket   # pip install websocket-client
ws = websocket.create_connection("wss://amd.lexogenix.com/v1/detect", header=["X-API-Key: lxa_..."])
ws.send(json.dumps({"config": {"sample_rate": 8000, "encoding": "pcm16", "call_id": "123", "phone": "15551234567"}}))
for chunk in audio_chunks():          # 8 kHz, 16-bit mono, e.g. 250 ms = 4000 bytes
    ws.send_binary(chunk)
    reply = ws.recv()
    if reply:
        print(reply)                  # e.g. MACHINE-2.05-0.9718
        break
ws.close()

Troubleshooting

What you seeWhat to do
unauthorized (API key / IP)The key is wrong, disabled, or the server's public IP is not in the key's allowed IPs. Check the key under API and dialers
CONNECTION_ERROR in the consoleThe dialer cannot reach amd.lexogenix.com on port 443. Check the firewall and DNS: curl -I https://amd.lexogenix.com. Calls fall back to stock AMD meanwhile
Installer warns about the certificateThe server's list of trusted certificates is out of date. Update the ca-certificates package, then run the install command again
No LexoAMD: lines in the consoleThe campaign is not using extension 8375. Check the Routing Extension, and run asterisk -rx "dialplan show 8375@default"
Many NO_AUDIO resultsAsterisk is not passing audio to the client. Make sure calls are answered before reaching 8375, which is the normal VICIdial flow
A result you disagree withListen on Detections, then send the recording with the right label on Send recordings

For anything else, contact your Lexogenix account manager with the call time and the number. The audio for each call is kept for 3 days, so report problems promptly.

Data and privacy

  • LexoAMD receives only the first seconds of each answered call, until it decides (at most 6 seconds), never the conversation with your agent.
  • That audio is kept for 3 days so you can listen to it on the Detections page, then deleted automatically.
  • Detection results (time, number, result) are kept for 180 days for your reports.
  • Audio travels over an encrypted connection (TLS). Your data is visible only to your company's logins and the LexoAMD team.
  • Recordings you send for training are used only to improve LexoAMD.