Asterisk 22 Installation on Ubuntu 24
VoIP School VoIP School
1.99K subscribers
9 views
0

 Published On Oct 17, 2024

Asterisk 22 Installation (voip.school)

This lesson can be completed on a Virtual Machine installed in your own notebook or in the Cloud. We use Digital Ocean for our labs because they use valid IP addresses making the installation simpler. You can choose one or another.

Lab 1 Asterisk Installation
In this Lab, we will learn how to install Asterisk step by step.

Instructions
Step 1: Install Ubuntu 24 Server in a virtual machine
You may download the image from Ubuntu 24 Downloads.

Linux installation is out of the scope of this training. Basic Linux knowledge is required.

Step 2: Install the dependencies
Run the following commands to update your system and install required packages:

sudo apt-get update
sudo apt-get install bison wget openssl libssl-dev libasound2-dev libc6-dev libxml2-dev libsqlite3-dev libnewt-dev libncurses-dev zlib1g-dev gcc g++ make perl uuid-dev git subversion unixodbc-dev unixodbc autoconf libedit-dev libsrtp2-dev libspandsp-dev bzip2 libcurl4-openssl-dev libopus-dev./
Note: The libsrtp2-dev and libspandsp-dev packages are new dependencies required by Asterisk 22.

Step 3: Download the source code
Navigate to /usr/src and download the latest version of Asterisk 22:

cd /usr/src
wget https://downloads.asterisk.org/pub/te...
tar -xzvf asterisk-22-current.tar.gz

Step 4: Compile Asterisk
Change to the decompressed Asterisk directory. You may need to update the name based on the version number:

cd asterisk-22-complete_with_decompressed_directory_name
./configure --with-jansson-bundled

Step 5: Compile and Install Asterisk
Run the following command to compile Asterisk and install it on your system:

make && sudo make install && sudo make config && sudo make samples

Step 6: Test if Asterisk is running
Start Asterisk in the foreground to verify that it’s working:

sudo asterisk -vvvvvvvvgc

Step 7: Stop Asterisk
From the Asterisk CLI, stop the process:

cli core stop now

Step 8: Start Asterisk in the background
Run Asterisk as a background process:

sudo asterisk

Step 9: Connect to the Asterisk Console
To connect to the running Asterisk console:

sudo asterisk -r
Stop again

core stop now

Step 10: Start using the systemd (the best way)
systemctl start asterisk
systemctl status asterisk

Troubleshooting

The most common errors are caused by missing dependencies. Ensure that all required packages have been installed.

show more

Share/Embed