Tested on: FreePBX 17
Also likely compatible with: FreePBX 15 / 16
The goal of this guide is to connect FreePBX/Asterisk to AVR (Agent Voice Response) over AudioSocket.
res_audiosocket
by default.res_audiosocket.so
is loaded.docker-compose
).You can check if the module is loaded by running:
asterisk -rx "module show like audiosocket"
Example for Debian/Ubuntu:
sudo apt-get update && apt-get install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
git clone https://github.com/agentvoiceresponse/avr-infra.git
cd avr-infra
For example, with Ultravox:
docker-compose -f docker-compose-ultravox.yml up -d
ss -lntp | grep :5001
Go to the FreePBX administration interface and configure as follows:
Admin → Config Edit → Asterisk Custom Configuration Files →
extensions_custom.conf
[ultravox-sts]
exten => 7000,1,NoOp(AVR <-> Ultravox STS)
same => n,Answer()
same => n,Set(AS_UUID=${SHELL(/usr/bin/uuidgen | /usr/bin/tr -d '\r\n')})
same => n,AudioSocket(${AS_UUID},127.0.0.1:5001)
same => n,Hangup()
Custom Destinations → Ultravox
docker logs avr-core
asterisk -rvvv
to view Asterisk console output in real time.
With this configuration, FreePBX routes calls to AVR Core over AudioSocket, enabling full integration with your ASR/LLM/TTS pipeline.