Asterisk voicemail detection that hears the hello
RingValee is Asterisk voicemail detection without the timers. Asterisk's AMD() times silences and counts words; RingValee listens to the answer itself, then fills in AMDSTATUS and AMDCAUSE just as AMD() would, so every line after it in your dialplan keeps working.
Trade one line for four
You need Asterisk 13 or newer. EAGI is built in. Copy ringvalee.agi.py into /var/lib/asterisk/agi-bin/, make it executable, and change the spot where your dialplan calls AMD().
same => n,AMD()
same => n,NoOp(${AMDSTATUS})
same => n,EAGI(ringvalee.agi.py,wss://amd.ringvalee.com/,YOUR_KEY,4500)
same => n,GotoIf($["${AMDSTATUS}" = "FALLBACK"]?native:decided)
same => n(native),AMD()
same => n(decided),NoOp(${AMDSTATUS} because ${AMDCAUSE})
How it runs: through EAGI, Asterisk hands the script the caller's audio on file descriptor 3, and the script passes it to RingValee in 100 ms frames over an encrypted WebSocket, waits for one verdict, sets the two variables and returns. If RingValee can't judge the call, you get FALLBACK before any audio is used and the old AMD() line takes over.
Same calls, two detectors
What usually comes back from each one, answer by answer.
| Who or what answered | Asterisk AMD() tends to say | RingValee says |
|---|---|---|
| A person: "Hello?… Hello?" | MACHINE (short words, then a long silence) | HUMAN |
| A short personal greeting | HUMAN | MACHINE |
| Google Call Screen, iPhone screening | Usually HUMAN | SCREENING |
| Busy, SIT, fax, ringback | No idea it's a tone | BUSY or TONE |
| Can't tell | NOTSURE | Listens up to 3.2 s, then decides; only a confident person is HUMAN |
How AMD() decides
- Timing rules: silence before speech, greeting length, word length and word count
- Nine settings in
amd.confor the dialplan, and the same values apply to every call - Results: HUMAN, MACHINE, NOTSURE or HANGUP
- Free, and it runs on your own server
How RingValee decides
- An AI model that hears the answer, plus tone checks and recognition of recorded hellos
- Nothing to tune
- Results: HUMAN, MACHINE, or FALLBACK (run
AMD()for that call) - 25,000 calls a month free, then plans from $79 a month (plans)
Curious why the timer gets the "Hello?… Hello?" call wrong? How RingValee decides walks through it.
Asterisk systems this works on
- Home-built predictive, progressive and power dialers on Asterisk
- FreePBX and Issabel servers used for outbound campaigns
- VICIdial and GoAutoDial, both Asterisk underneath
On FreeSWITCH instead? There's a Lua script for FreeSWITCH. Any other system that can send 8 kHz, 16-bit audio can talk to the WebSocket API directly.
python3 /var/lib/asterisk/agi-bin/ringvalee.agi.py --test wss://amd.ringvalee.com/ YOUR_KEY should print AMDSTATUS=MACHINE AMDCAUSE=SILENCE.Let your agents talk to people, not greetings
25,000 calls a month free, no card. If anything goes wrong, your dialer quietly falls back to Asterisk AMD() for that call.