Working Asterisk in a container for calling 2 users . 1001 and 1002.
10K+
This is a simple asterisk server that I made as a project for my college work. It enables 2 users to call each other within your local wifi network.
use this line to download the image to your machine
sudo docker pull mrnewtn/asterisk
or directly use download and install and run the image with this line.
sudo docker run -d --name container_name --network=host mrnewtn/asterisk
It should be setup now and u can call normally between the 2 users once logged in to a sip account mentioned below.
You can use a free soft sip phone application to login to make calls: for example MicroSIP for Windows, LinPhone for both Linux and Windows etc.. ensure that You are using the below login details for it to work. Select SIP ACCOUNT option when logging in.
Current user login details are as follows:
User 1:
username: 1001
password: 1001
User 2:
username: 1002
password: 1002
In the SIP Domain field add the server/pc IP address :: use the below command to get your local IP address.
ip -4 -o addr show enp0s3 | awk '{print $4}' | cut -d'/' -f1
In the transport protocol use 'UDP'
Config files are only configured for 2 users at the moment 1001 and 1002 but it can be scaled according to whatever the user count is by modifying the following files located in the "/etc/asterisk" folder in the container accordingly.
sip.conf
extensions.conf
voicemail.conf
for the sip.conf file add more users by copy pasting the below lines of code into to sip.conf file and change the last digit in username ' [100X] ' and ' secret=100x ' for each new user.
[1001]
type=friend
host=dynamic
secret=1001
context=internal
for extensions.conf update it according to number of users.
Content type
Image
Digest
sha256:d411f1cb8…
Size
134.8 MB
Last updated
over 1 year ago
docker pull mrnewtn/asterisk