Docker Images for Asterisk

Hello Guys!
Whenever we have a new project or work related to Asterisk PBX we often need to install Asterisk and configure on the server. This is very time taking process and repetitive work for the Administrators. To reduce such valuable time of resources I have created some Asterisk server images, which has native Asterisk installation with almost all required packages and Asterisk Realtime configuration.

1. Docker image for Asterisk Realtime

This image contains Asterisk 18 installed on Ubuntu 20.04 (base OS focal). The Asterisk Realtime configuration also done on this and have added two PJSIP endpoints 101/102 for reference and also have created one queue customer_support. All these resources are in Realtime and loaded from Mysql database.

Following software packages are available in this image.

Software Available:
Mysql 8.0.32-0ubuntu0.20.04.2 (Ubuntu)
Apache/2.4.41 (Ubuntu)
Asterisk 18.16.0
PHP 7.4.3-4ubuntu2.17 (cli)

To use this docker image just follow below steps:

Pull the image to your server:

docker pull ankitjayswal/asterisk_realtime

Run/Create container with below command

docker run -it ankitjayswal/asterisk_realtime

Come outside of containerwith Ctrl+D and run below command to see all dockers

docker ps -a

You will see below container with container ID

Now start the container with container id

docker start 101cda848bc5

After starting the container connect the container with below command

docker exec -it 101cda848bc5 /bin/bash

Start Mysql service if not  started

service mysql start

Start Asterisk service

asterisk

Connect to Asterisk CLI

asterisk -rvvvv

Now check PJSIP users with below command

pjsip show endpoints

Check queue with below command.

queue show

Great! We can see above resources are getting loaded from the Asterisk Realtime database.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *