This guide explains how to configure Asterisk PBX so that calls are sent to AVR Core via the AudioSocket channel driver.
Before proceeding, ensure you have:
192.168.1.100:6000).uuidgen command available on your system (usually pre-installed on Linux).extensions.confAsterisk dial plans are configured in the extensions.conf file.
By default, this file is located in:
/etc/asterisk/extensions.conf
Option 1 – Direct AudioSocket Connection:
same => n,AudioSocket(${UUID},IP_AVR_CORE:PORT_AVR_CORE)`
Option 2 – Recommended for scalability (Dial syntax):
same => n,Dial(AudioSocket/IP_AVR_CORE:PORT_AVR_CORE/${UUID})
The Dial method is recommended because it integrates better with Asterisk’s native call handling, enabling more flexible call routing and scalability.
Below is a minimal working example that answers a call, generates a UUID, and connects it to AVR Core.
[avr-context]
exten => 5001,1,Answer()
same => n,Ringing()
same => n,Wait(1)
same => n,Set(UUID=${SHELL(uuidgen | tr -d '\n')})
same => n,Dial(AudioSocket/IP_AVR_CORE:PORT_AVR_CORE/${UUID})
same => n,Hangup()
Explanation:
After editing extensions.conf, reload the Asterisk dialplan:
asterisk -rx "dialplan reload"
asterisk -rvvvvv
Tip: For production deployments, you may want to place AVR Core on a dedicated network interface or behind a load balancer for better scalability.