This is a lightweight Asterisk 20.9.2 Docker image optimized for VoIP applications. The image is based on Ubuntu 22.04 and includes only essential modules and features.
- Asterisk 20.9.2
- PJSIP support
- Manager API enabled
- HTTP API enabled
- Prometheus metrics enabled
- Minimal footprint with only essential modules
- Timezone set to Europe/Rome by default
docker run -d \
--name asterisk \
-p 5038:5038 \
-p 8088:8088 \
-p 10000-20000:10000-20000/udp \
-v /path/to/your/config:/etc/asterisk \
agentvoiceresponse/avr-asterisk:latestversion: '3.8'
services:
asterisk:
image: agentvoiceresponse/avr-asterisk:latest
container_name: asterisk
ports:
- "5038:5038" # Manager API
- "8088:8088" # HTTP API
- "10000-20000:10000-20000/udp" # RTP ports
volumes:
- ./config:/etc/asterisk
restart: unless-stoppedThe container uses the following default configuration files:
extensions.confpjsip.confmanager.confqueues.confari.conf
You can override these configurations by mounting your own configuration files to /etc/asterisk/ in the container.
- 5038: Asterisk Manager Interface (AMI)
- 8088: HTTP API
- 10000-20000: RTP ports for media streaming
TZ: Timezone (default: Europe/Rome)
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
[6001]
type=endpoint
context=from-internal
disallow=all
allow=ulaw
allow=alaw
auth=6001
aors=6001
[6001]
type=auth
auth_type=userpass
password=your_password
username=6001
[6001]
type=aors
max_contacts=1[from-internal]
exten => 6001,1,Answer()
exten => 6001,n,Echo()
exten => 6001,n,Hangup()If you want to build the image locally:
git clone https://github.com/your-repo/avr-asterisk.git
cd avr-asterisk
docker build -t agentvoiceresponse/avr-asterisk:latest .