• Stars
    star
    254
  • Rank 160,264 (Top 4 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Asterisk PBX in Docker on Alpine Linux. Smallest Asterisk ever! ;)

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

More Repositories

1

build-raspbian-image

Build (and cross-compile) your own image for Raspberry Pi
Shell
156
star
2

alpine-ruby

The smallest Docker image with Ruby 2.2 (~27MB) https://hub.docker.com/r/andrius/alpine-ruby/
Dockerfile
29
star
3

pjsua

SIP user agent (cli) based on PJSUA. Docker version
Shell
20
star
4

manjaro-sway-themes

Color themes for manjaro sway and foot terminal (https://manjaro.org/download/#sway and https://github.com/Manjaro-Sway/manjaro-sway)
HTML
9
star
5

alpine-tor

tor on alpine linux on docker
Dockerfile
8
star
6

blink-dotfiles

Dotfiles for tmux and vim/nvim working with blink and mac os
Dockerfile
8
star
7

AsteriskRuby

A full featured Asterisk AGI Framework on Ruby. Minimal and powerful
Ruby
7
star
8

docker-asterisk

Dockerfiles for Asterisk PBX
Lua
4
star
9

dejavu-docker

dejavu on docker: Audio fingerprinting and recognition in Python – https://github.com/worldveil/dejavu
4
star
10

sandbox

Sandbox — test code, snippets and another useless remainings ;)
Shell
3
star
11

tower-proxified

Tower (best git client for mac) through SOCKS5 proxy
Shell
3
star
12

ascii-patrol

Docker version of Ascii Patrol - an ASCII game project, mainly inspired by arcade game "Moon Patrol"
3
star
13

alpine-sngrep

sngrep – Ncurses SIP Messages flow viewer (docker version)
Shell
3
star
14

freeswitch

Dockerised freeswitch
3
star
15

openconnect-docker

openconnect (client to Pulse Secure VPN) in docker
Shell
2
star
16

.dotfiles

Andrius's dotfiles
Shell
2
star
17

docker-asterisk13

Shell
1
star
18

hcloud-packer-templates

Manjaro linux packer template for Hetzner cloud
Shell
1
star
19

tor

tor in docker
1
star
20

blink-colorschemes

tools that convert colorschemes for blink.sh terminal
JavaScript
1
star
21

asterisk-click-to-call-windows

Ruby client/server for Asterisk PBX with windows client (you have to compile it under Windows!)
Ruby
1
star
22

xorg

xorg with icewm with VNC on docker
Shell
1
star
23

silence-detect

Creates Asterisk conference with confbridge and detect silence (or when one of participants stop/start talking) through AMI event TalkingStatus
Ruby
1
star