Asterisk Integration
VEXYL AI Voice Gateway connects to Asterisk using the AudioSocket protocol, allowing you to route standard telephone calls to AI agents.
Prerequisites
- Asterisk 16+ with
app_audiosocketmodule - VEXYL Gateway running on port 8080 (TCP)
Basic Dialplan
Add this to /etc/asterisk/extensions.conf:
[voice-assistant]
exten => 100,1,Answer()
exten => 100,n,Set(SESSION_UUID=${UNIQUEID})
exten => 100,n,AudioSocket(${SESSION_UUID},127.0.0.1:8080)
exten => 100,n,Hangup()
Passing Metadata
You can pass caller ID, name, and language to VEXYL before connecting the audio:
exten => 100,n,Set(CURL_RESULT=${CURL(http://127.0.0.1:8081/session/${SESSION_UUID}/metadata,callerid=${CALLERID(num)}&name=John)})
Troubleshooting
If calls drop immediately, check that the AudioSocket server port (8080) is accessible from the Asterisk server and not blocked by a firewall.