How to Configure LibPRI in Asterisk

We can say that LibPRI is an open source library that can encapsulate protocols which are used to communicate over the ISDN Primary Rate Interface (T1, E1, J1). In this modern era due to increasing in telephone and mobile sector it is easy to connect or reached a targeted client in less time. Due to this we can connect many peoples in short period of time and increase our productivity.

In this article we are going to learn how to configure LibPRI in Asterisk and learn some basic method for calling.

Configuration of the LibPRI:

Step 1 –

Disable selinux:

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

Step 2 –

Update the System: yum update –y

Step 3 –

Install Prerequisites:



apt-get -y install build-essential

apt-get -y install gcc

apt-get -y install g++

apt-get -y install automake

apt-get -y install autoconf

apt-get -y install libtool

apt-get -y install make

apt-get -y install libncurses5-dev

apt-get -y install flex

apt-get -y install bison

apt-get -y install patch

apt-get -y install libtool

apt-get -y install linux-source-$(uname -r)

apt-get -y install linux-headers-$(uname -r)

apt-get -y install libsctp-dev

apt-get -y install libtool

Step 4 –

Change the source directory: cd /usr/src/

Step 5 –

Download LibPRI from the following link:


Step 6 –

Extract the files: tar zxvf libpri*

Step 7 –

Install Lib pri:

  1. cd libpri-1.4.14/
  2. make
  3. make install

Step 8 –


wanrouter stop

wanrouter start

/etc/init.d/asterisk stop


/etc/init.d/asterisk start


There are basically three different methods for calling are:

  1. Sip Trunk
  2. PRI
  3. GSM

Sip Trunk: Session Initiation Protocol (SIP), is a service which is provided by the communication service generator using the protocol VoIP (Voice Over IP) to connect the people with the phone system. It is used to receive and send calls through the internet.

PRI: The Primary Rate Interface (PRI) is basically for Telecommunication used in Integrated Services Digital Networks (ISDNs). In the ISDN network there are two services BRI and PRI. BRI is used for small enterprises and PRI is for big enterprises. PRI can provide high-capacity service which is used in T1 or E1 lines.

GSM: Global System for Mobile (GSM) is an open source mobile phone technology used for transmitting the mobile voice and data services. The GSM can work on three different carrier frequencies 900 MHz band, 1800 MHz band, 1900 MHz band.

Follow US:

Leave a Reply

Your email address will not be published. Required fields are marked *