Skip to content

Instantly share code, notes, and snippets.

@altanai
Last active August 19, 2022 07:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save altanai/0d8cadbe6876d545fd63d6b3e79dcf73 to your computer and use it in GitHub Desktop.
Save altanai/0d8cadbe6876d545fd63d6b3e79dcf73 to your computer and use it in GitHub Desktop.
RTPEngine on Ubuntu16 to be used with Kamailio as SIP proxy

Requirnments

sudo su 

apt update -y

apt-get install debhelper iptables-dev libcurl4-openssl-dev libglib2.0-dev  libjson-glib-dev libxmlrpc-core-c3-dev libhiredis-dev build-essential:native

for pcap

apt install ibpcap-dev

some ffmpeg pakages like

apt install libavcodec-dev libavfilter-dev libavformat-dev libavresample-dev  libavutil-dev

for dpkg

apt install libcrypt-openssl-rsa-perl libdigest-crc-perl libio-multiplex-perl libnet-interface-perl libsystemd-dev markdown

DBHELPER It is a combination of tool to build debain packages and if u see a dbhelper or dbhelper-compat error during dpkg-buildpackage then check the debian/control file for versio of dbhelper it is asking for like

Build-Depends:
 debhelper-compat (=12),

if you version of ubuntu doesnt have dbhelper 12 then changes this to reflect what you have like xneial has v10 so

Build-Depends:
 debhelper (>= 10)

Now to install debhelper>10

vi /etc/apt/sources.list

add line

deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
sudo apt update

Force installing the version from backports repo

sudo apt install -t xenial-backports dh-autoreconf=12~ubuntu16.04.1 debhelper=10.2.2ubuntu1~ubuntu16.04.1

checke the priotity by seeing whre double **

 apt-cache policy debhelper dh-autoreconf
debhelper:
  Installed: 10.2.2ubuntu1~ubuntu16.04.1
  Candidate: 12.1.1~nd+1
  Version table:
     12.1.1~nd+1 500
        500 http://neurodebian.ovgu.de/debian sid/main amd64 Packages
 *** 10.2.2ubuntu1~ubuntu16.04.1 100
        100 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
        100 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     9.20160115ubuntu3 500
        500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
dh-autoreconf:
  Installed: 12~ubuntu16.04.1
  Candidate: 12~ubuntu16.04.1
  Version table:
 *** 12~ubuntu16.04.1 100
        100 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
        100 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     11 500
        500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Get RTPEnegine sourcecode

cd /usr/local/src
git clone https://github.com/sipwise/rtpengine.git

RTPengine Installation

cd rtpengine
dpkg-buildpackage

use dpkg-checkbuilddeps to find any missing dependices

For missing dependencies

dpkg-checkbuilddeps: error: Unmet build dependencies: libbcg729-dev

remove the encoder for G.729 which is not supported by ffmpeg by exporting varible

export DEB_BUILD_PROFILES="pkg.ngcp-rtpengine.nobcg729"

ref : https://github.com/sipwise/rtpengine#g729-support

for defaultlibmysqlclient-dev and libiptc-dev

vi debian/control

change from default-libmysqlclient-dev to libmysqlclient-dev, change from libiptcdata-dev to libiptc-dev and install the alternatives such as

apt install libmysqlclient-dev libiptcdata-dev 

Install the debs

cd ..
dpkg -i ngcp-rtpengine-daemon_7.3.0.0+0~mr7.3.0.0_amd64.deb
dpkg -i ngcp-rtpengine-iptables_7.3.0.0+0~mr7.3.0.0_amd64.deb
dpkg -i ngcp-rtpengine-kernel-dkms_7.3.0.0+0~mr7.3.0.0_all.deb
dpkg -i ngcp-rtpengine-kernel-source_7.3.0.0+0~mr7.3.0.0_all.deb
dpkg -i ngcp-rtpengine-recording-daemon_7.3.0.0+0~mr7.3.0.0_amd64.deb
dpkg -i ngcp-rtpengine-utils_7.3.0.0+0~mr7.3.0.0_all.deb
dpkg -i ngcp-rtpengine_7.3.0.0+0~mr7.3.0.0_all.deb

If you are changing between branches and versions remeber to clean the repo

git clean -f -x -d
@kdkaushik
Copy link

Hello Altanai Bisht,
I am installing rtpengine on debian 11, So do you have any special instructions for debian version??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment