How to install asterisk 16 on centos 7

1 Answer(s)

    Install Asterisk 16 on CentOS 7

    Before you start executing Asterisk install commands on your CentOS 7 server, make sure all the package son the system are up to date.

    sudo yum -y update


    Set Hostname:


    sudo hostnamectl set-hostname

    Add EPEL repository

    sudo yum  -y install epel-release

    Set SELinux  in Permissive Mode by running the commands below:


    sudo setenforce 0
    sudo sed -i 's/\(^SELINUX=\).*/\SELINUX=permissive/' /etc/selinux/config

    Then follow the steps below to install and configure Asterisk 16 on your CentOS 7 / Fedora server.

    Step 1: Install Asterisk 16 PBX dependencies

    The initial step when setting up Asterisk is to install all required dependencies.

    sudo yum -y install wget vim  net-tools

    You also need to install Development Tools group packages.

    sudo yum -y groupinstall "Development Tools"

    The other packages that you need to install are:

    sudo yum -y install libedit-devel sqlite-devel psmisc gmime-devel ncurses-devel libtermcap-devel sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel uuid-devel libtool libuuid-devel subversion kernel-devel kernel-devel-$(uname -r) git subversion kernel-devel crontabs cronie cronie-anacron wget vim

    Step 2: Download and Install Jansson

    Jansson is a C library for encoding, decoding and manipulating JSON data. Download and install it on CentOS 7 server by running the commands below:

    cd /usr/src/
    git clone
    cd jansson
    autoreconf  -i
    ./configure --prefix=/usr/
    make && make install

    Step 3: Download and Install PJSIP

    PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. Clone the project from Github, then compile and install.

    cd /usr/src/ 
    export VER="2.10"
    tar -xvf ${VER}.tar.gz
    cd pjproject-${VER}
    ./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr
    make dep
    make install

    Step 4: Download and Install Asterisk

    Now that we have all dependency packages installed, we should be ready to download and install Asterisk 16 on CentOS 7

    cd /usr/src/


    tar xvfz asterisk-16-current.tar.gz

    cd asterisk-*

    ./configure –libdir=/usr/lib64

    make menuselect

    sudo contrib/scripts/


    make install

    make samples

    make config



    Answered on August 24, 2021.

    If any error  regarding NOISE_BUILD or jansson , try this

    ./configure –libdir=/usr/lib64 NOISY_BUILD=yes –with-jansson-bundled

    on August 24, 2021.


    ./configure --libdir=/usr/lib64


    on August 27, 2021.
    Add Comment

    Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.