There’s a few RTP Proxies out there (rtpproxy/mediaproxy) but rtpengine from Sipwise has simplicity and flexibility that makes you wonder how you ever used the others.
Some of it’s more impressive features:
- Bridge Encrypted (SRTP) & Plaintext RTP Sessions
- ICE Bridge
- Farmable loads (Can have a pool of RTPengine instances)
- Recording of Media Streams (In a not stupid – accidentally-fill-up-the-disk way)
- Transcoding
- Media repacketization
Installation
This package isn’t in the default Ubuntu/Debian repos, so we’ll get it from the git repo:
git clone https://github.com/sipwise/rtpengine.git cd rtpengine
Next we’ll need to install some dependencies:
apt-get install debhelper default-libmysqlclient-dev gperf iptables-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbencode-perl libcrypt-openssl-rsa-perl libcrypt-rijndael-perl libhiredis-dev libio-multiplex-perl libio-socket-inet6-perl libjson-glib-dev libdigest-crc-perl libdigest-hmac-perl libnet-interface-perl libnet-interface-perl libssl-dev libsystemd-dev libxmlrpc-core-c3-dev libcurl4-openssl-dev libevent-dev libpcap0.8-dev markdown unzip nfs-common dkms libspandsp-dev
The dependency you’ll get stuck on will be the G.729 library, which we have to manually compile.
VER=1.0.4
curl https://codeload.github.com/BelledonneCommunications/bcg729/tar.gz/$VER >bcg729_$VER.orig.tar.gz
tar zxf bcg729_$VER.orig.tar.gz
cd bcg729-$VER
git clone https://github.com/ossobv/bcg729-deb.git debian
dpkg-buildpackage -us -uc -sa
cd ../
dpkg -i libbcg729-*.deb
Now let’s check the RTPengine dependencies again:
dpkg-checkbuilddeps
If you get an empty output you’re good to start building the packages:
dpkg-buildpackage
If that completed sucessfully in the directory above you should have a bunch of .deb files:
cd ../
dpkg -i ngcp-rtpengine-daemon_*.deb ngcp-rtpengine-iptables_*.deb ngcp-rtpengine-kernel-dkms_*.deb
Getting it Running
Now we’ve got RTPengine installed let’s setup the basics,
There’s an example config file we’ll copy and edit:
mv /etc/rtpengine/rtpengine.sample.conf /etc/rtpengine/rtpengine.conf
vi /etc/rtpengine/rtpengine.conf
We’ll uncomment the interface line and set the IP to the IP we’ll be listening on:

Once we’ve set this to our IP we can start the service:
/etc/init.d/ngcp-rtpengine-daemon start
All going well it’ll start and rtpengine will be running.
You can learn about all the startup parameters and what everything in the config means in the readme.
Want more RTP info?
If you want to integrate RTPengine with Kamailio take a look at my post on how to set up RTPengine with Kamailio.
For more in-depth info on the workings of RTP check out my post RTP – More than you wanted to Know
4 replies on “RTPengine – Installation & Configuration”
[…] We’ll assume you’ve already got a rtpengine instance on your local machine running, if you don’t check out my previous post on i… […]
[…] you’ve setup your RTPengine installation as per this tutorial, and have it working with Kamailio to relay RTP, you can simply change the rtpengine_manage() to […]
[…] We’d set it up in the way outlined in this post, […]
[…] исходная статья. […]