Asterisk PBX on Alpine Linux with PJSIP, custom dial plan, and RTP port range pre-configured.
482
A containerized Asterisk PBX image built on Alpine Linux, pre-configured with PJSIP support, a custom entrypoint, and a large RTP port range — ready to drop into your VoIP infrastructure.
apk with asterisk-sample-configpjsip_local.conf include patternextensions.conf and pjsip_local.conf baked in/docker-entrypoint.d/setup-instructions.sh/entrypoint.shC.UTF-8docker pull malan5/malan2_asterisk:latest
docker run -d \
--name asterisk \
-p 5060:5060/tcp \
-p 5060:5060/udp \
-p 10000-20000:10000-20000/udp \
malan5/malan2_asterisk:latest
Tip: For production SIP/RTP use, consider
--network hostto avoid NAT issues inside Docker.
| Port | Protocol | Purpose |
|---|---|---|
5060 | TCP & UDP | SIP signaling |
10000–20000 | UDP | RTP media streams |
The image explicitly exposes the full
10000–20000UDP range for RTP media to support concurrent calls without port conflicts.
The following paths are declared as volumes for persistent data:
| Path | Purpose |
|---|---|
/var/lib/asterisk/sounds | Audio/sound files |
/var/lib/asterisk/keys | TLS/encryption keys |
/var/lib/asterisk/phoneprov | Phone provisioning files |
/var/spool/asterisk | Call spooling (voicemail, etc.) |
/var/log/asterisk | Asterisk logs |
Mount these to preserve data across container restarts:
-v /path/to/sounds:/var/lib/asterisk/sounds \
-v /path/to/logs:/var/log/asterisk \
-v /path/to/spool:/var/spool/asterisk
To customize your dial plan or SIP peers, mount your own config files:
-v $(pwd)/extensions.conf:/etc/asterisk/extensions.conf \
-v $(pwd)/pjsip_local.conf:/etc/asterisk/pjsip_local.conf
The image appends #include pjsip_local.conf into pjsip.conf at build time, so your local PJSIP overrides are automatically picked up.
| Variable | Value |
|---|---|
LANG | C.UTF-8 |
LC_ALL | C.UTF-8 |
The container starts with /entrypoint.sh and runs Asterisk in foreground mode (asterisk -f) by default.
Content type
Image
Digest
sha256:91212ed91…
Size
16.4 MB
Last updated
6 months ago
docker pull malan5/malan2_asterisk