Tutorial: Installing Asterisk 13 with PJSIP on Debian or Ubuntu

Tutorial: Installing Asterisk 13 with PJSIP on Debian or Ubuntu

Quick tutorial to install Asterisk 13 on Debian or Ubuntu with PJSIP enabled.
These are the steps required to compile the Asterisk 13 from source

First, let’s run the basic commands

apt-get update
apt-get upgrade

apt-get install build-essential
apt-get install openssl libjansson-dev sqlite libxml2-dev libncurses5-dev uuid-dev sqlite3 libsqlite3-dev pkg-config

In case you want PJSIP installed, let’s prepare it

cd /usr/src/
wget http://www.pjsip.org/release/2.3/pjproject-2.3.tar.bz2
tar -xjvf pjproject-2.3.tar.bz2
cd pjproject-2.3
./configure --prefix=/usr/lib --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr CFLAGS='-O2 -DNDEBUG'

make dep && make && make install
ldconfig
cd ..

Installing Asterisk 13

cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar xvzf asterisk-13-current.tar.gz
cd asterisk-13*
./configure
make menuselect

Select options res_pjsip and chan_pjsip in case you went for pjsip

make &&  make install &&  make samples
asterisk

And at the end, you should have Asterisk 13 running. To enter the CLI, run


asterisk -rvvv

The output from the CLI

Asterisk 13.0.0, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.0.0 currently running on debian (pid = 19973)
debian*CLI>

Struggling with Asterisk installation on the server? Asterisk Consulting provides professional services. If you want us to help you with installing and configuring Asterisk 13, please contact us.

Brussels (BE) Prague (CZ) tech@asterisk.consulting
VirtualPBX: The Complete Business Phone Solution

Showing 3 comments

  1. fchin

    For my case, I needed to use “–prefix=/usr” instead of “–prefix=/usr/lib” when configuring pjsip.

Leave a Reply