You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
zhongjin 036cec9166
更新 'centos/1.6.2.24/build-asterisk.sh'
2 years ago
.act fetch-asterisk-releases and build workflows 2 years ago
.github fetch-asterisk-releases - skip git operations if there is no updates 2 years ago
alpine fetch-asterisk-releases and build workflows 2 years ago
alpine-glibc 更新 'alpine-glibc/Dockerfile' 2 years ago
centos 更新 'centos/1.6.2.24/build-asterisk.sh' 2 years ago
debian 更新 'debian/10.12.4/build-asterisk.sh' 2 years ago
tests make repository great again ;) 3 years ago
.gitignore Build apline images using GitHub workflow 2 years ago
LICENSE Dockerfile 8 years ago
Makefile Build apline images using GitHub workflow 2 years ago
README.md Update README.md 3 years ago
asterisk-certified-releases.txt Automatic update of asterisk releases file(s) on 2022-05-16 15:40:23 2 years ago
asterisk-releases.txt Automatic update of asterisk releases file(s) on 2022-05-16 15:40:23 2 years ago
build-and-push.sh Early versions of asterisk: 1.2, 1.4 and 1.6, symlinks 6 years ago
build.sh 更新 'build.sh' 2 years ago
check-docker-hub.sh Updated tags, now it containing linux distributive, version and asterisk version 6 years ago
post_checkout.erb whole range of asterisk releases plus basic testing 5 years ago
post_push.erb whole range of asterisk releases plus basic testing 5 years ago

README.md

Asterisk PBX Docker image

REFACTOR! I started massive refactor, considering comments received in the issues and private emails. Thank you all for the feedback! Once ready, This readme will be updated, right away please look to the existing docker tags on hub

The smallest Docker image with Asterisk PBX https://hub.docker.com/r/andrius/asterisk/

This image is based on Alpine Linux image, which is only a 5MB image, and contains Asterisk PBX.

Total size of this image for latest tag (based on Alpine linux) is:

And for debian-stretch-slim-15-current .

Custom UID/GID

By default, Asterisk will run as default user (asterisk) with UID and GID assigned by alpine linux, but it's possible to specify then through environment variables:

  • ASTERISK_UID
  • ASTERISK_GID (note, GID is not supported in debian releases)

Default asterisk user will be re-created with new UID and GID

In given example, ID's of current host user will be used to start, that will fix permissions issues on logs volume:

docker run -ti --rm \
  -e ASTERISK_UID=`id -u` \
  -e ASTERISK_GID=`id -g` \
  -v ${PWD}/logs:/var/log/asterisk \
  andrius/asterisk

Alternative user

It is possible to specifty other than asterisk user to start through environment variable ASTERISK_USER:

docker run -ti --rm -e ASTERISK_USER=root andrius/asterisk

Versions

Based on Alpine linux:

  • docker pull andrius/asterisk:11.6.1 for Asterisk 11.x (stable release), Alpine 2.6
  • docker pull andrius/asterisk:11 for Asterisk 11.x (stable release), Alpine 2.7
  • docker pull andrius/asterisk:14 for Asterisk 14.x, Alpine 3.6
  • docker pull andrius/asterisk:15.2.2 for Asterisk 15.2.2, Alpine 3.7
  • docker pull andrius/asterisk:15 for Asterisk 15.x, Alpine 3.8
  • docker pull andrius/asterisk:latest for Asterisk 15.x, Alpine latest
  • docker pull andrius/asterisk:edge for latest Asterisk 15.x, based on Alpine edge

What's missing

Only base Asterisk packages installed. If you want to add sounds, it's recommended to mount them as volume or data container, however you may install additional packages with apk command:

  • asterisk-alsa - ALSA channel;
  • asterisk-cdr-mysql - MySQL CDR;
  • asterisk-chan-dongle - chan_dongle, to manage calls and SMS through Huawei USB dongle;
  • asterisk-curl - curl integration with Asterisk;
  • asterisk-dahdi - DAHDI channel (ISDN BRI/PRI, FXO and FXS cards integration);
  • asterisk-fax - support faxing
  • asterisk-mobile - Use Bluetooth mobile phones as FXO devices;
  • asterisk-odbc - ODBC support;
  • asterisk-pgsql - PostgreSQL support;
  • asterisk-sounds-en - sounds
  • asterisk-sounds-moh - music on hold;
  • asterisk-speex - Speex codec;
  • asterisk-srtp - SRTP encryption;
  • asterisk-tds - MS SQL support.

Database support

By default, Asterisk PBX store CDR's to the CSV file, but also support databases. Refer Asterisk PBX documentation for ODBC support.

For Postgre SQL include following lines to your Dockerfile:

RUN apk add --update less psqlodbc asterisk-odbc asterisk-pgsql \
&&  rm -rf /var/cache/apk/*

And For MySQL:

For MySQL, mysql-connector-odbc should be downloaded from the official site and compiled

Based on Debian linux:

Debian Jessie:

  • docker pull andrius/asterisk:debian-11.25.3
  • docker pull andrius/asterisk:debian-12.8.2

Debian Stretch:

  • docker pull andrius/asterisk:debian-13-current
  • docker pull andrius/asterisk:debian-14-current
  • docker pull andrius/asterisk:debian-15-current