Contact

Blogs

Take a look at the things that interest us.

Install Asterisk 16 on Centos 7

Wesley Wesley 3 years

In today's post, we are going to install Asterisk 16 on our centos 7 system. To get started we first update our centos system.

$ yum update all

After this, let's install the packages that are needed for our Asterisk 16 installation.

$ yum install vim epel-release gcc gcc-c++ wget make bzip2 patch subversion json-c json-c-devel unixODBC unixODBC-devel mysql-connector-odbc libtool-ltdl libtool-ltdl-devel jansson-devel libsrtp-devel openssl openssl-devel dmidecode ncurses-devel libxml2-devel newt-devel kernel-devel sqlite-devel libuuid-devel gtk2-devel binutils-devel libedit libedit-devel svn

SELinux

The next step is to disable SELinux. Let's open the SELinux config file.

$ vim /etc/selinux/config

Now set the SELinux module to disabled

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted

Save the file and reboot the system.

$ sudo shutdown -r now

Once the system has been rebooted you can check the SELinux status again with the following command.

$ sestatus
output
SELinux status:                 disabled

Install Pjsip

The next step is to install Pjsip, this package is used within Asterisk. Let's download the Pjsip package and set it up

$ cd /usr/src/
$ wget https://github.com/pjsip/pjproject/archive/2.10.tar.gz
$ tar zxvf 2.10.tar.gz
$ rm -f 2.10.tar.gz

Now it's time to install Pjsip on our Centos 7 system.

$ cd pjproject-2.10
$ ./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr
$ make dep
$ make
$ make install
$ ldconfig

Install Asterisk 18

After Pjsip has been installed we can start installing the Asterisk 16. Let's start with downloading Asterisk 16.

$ cd /usr/src/
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz
$ tar xvfz asterisk-16-current.tar.gz
$ rm -f asterisk-16-current.tar.gz

Now let's install Asterisk 16

$ cd /usr/src/asterisk-16*/
$ contrib/scripts/install_prereq install
$ ./configure --libdir=/usr/lib64 --with-jansson-bundled
$ make menuselect.makeopts
$ menuselect/menuselect --enable chan_ooh323 --enable format_mp3 --enable CORE-SOUNDS-JA-WAV --enable CORE-SOUNDS-JA-ULAW --enable CORE-SOUNDS-JA-ALAW --enable CORE-SOUNDS-JA-GSM --enable CORE-SOUNDS-JA-G729 --enable CORE-SOUNDS-JA-G722 --enable CORE-SOUNDS-JA-SLN16 --enable CORE-SOUNDS-JA-SIREN7 --enable CORE-SOUNDS-JA-SIREN14 --enable app_macro --disable BUILD_NATIVE
$ contrib/scripts/get_mp3_source.sh
$ make
$ make install
$ make samples
$ make config
$ ldconfig

Enabled and start Asterisk.

$ sudo systemctl enable asterisk
$ sudo systemctl start asterisk

Asterisk 16 has been installed on your Centos 7 system.

Install Asterisk 16 on Centos 7 2021-08-24 08:02:47

There are no comments.

4902

Have questions about our services?

Contact our Sales team to get answers.

Contact Us
gomibako@aska-ltd.jp