Installing RTPEngine on Ubuntu 20.04/18.04

Installing RTPEngine on Ubuntu 14.04:

First of all Clone the RTPengine project from GitHub. To clone the RTPengine use below command.

apt-get install git
git clone https://github.com/sipwise/rtpengine.git rtpengine

git clone https://github.com/sipwise/rtpengine.git rtpengine
Cloning into ‘rtpengine’…
remote: Counting objects: 6575, done.
remote: Total 6575 (delta 0), reused 0 (delta 0), pack-reused 6575
Receiving objects: 100% (6575/6575), 1.90 MiB | 0 bytes/s, done.
Resolving deltas: 100% (4798/4798), done.
Checking connectivity… done.

Then enter into rtpengine directory and run ./debian/flavors/no_ngcp in order to remove any NGCP dependencies.

cd rtpengine
./debian/flavors/no_ngcp

Then we need to run the dpkg-buildpackage command. But I got lot of dependencies.. here is the list.

dpkg-buildpackage

dpkg-buildpackage
………
Unmet build dependencies: debhelper (>= 5) iptables-dev (>= 1.4) libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl3-openssl-dev | libcurl3-gnutls-dev libglib2.0-dev (>= 2.30) libpcre3-dev libxmlrpc-c3-dev (>= 1.16.07) | libxmlrpc-core-c3-dev (>= 1.16.07) markdown
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)

Let’s Install dependencies one by one.

apt-get install debhelper
apt-get install iptables-dev
apt-get install libcurl4-openssl-dev
apt-get install libpcre3-dev libxmlrpc-core-c3-dev
apt-get install markdown

Then try to build RTPengine once again.
dpkg-buildpackage

Now I got one more dependency libglib2.0-dev. so let’s install this one also
apt-get install libglib2.0-dev

Now once again try to build RTP Engine.
dpkg-buildpackage

Success! Build Completed, Few .deb files are created in the parent directory(use cd .. ).
Let’s Install those deb files..

cd ..
dpkg -i ngcp-rtpengine-daemon_4.1.0.0+0~mr4.1.0.0_amd64.deb
dpkg -i ngcp-rtpengine-iptables_4.1.0.0+0~mr4.1.0.0_amd64.deb
dpkg -i ngcp-rtpengine-dbg_4.1.0.0+0~mr4.1.0.0_amd64.deb
dpkg -i ngcp-rtpengine-dev_4.1.0.0+0~mr4.1.0.0_all.deb

Note: .deb file name may varies with version. 

if you want to install Kernel module then you need to install the dkms package so first install dkms package then install the Kernel module.

apt-get install dkms
dpkg -i ngcp-rtpengine-kernel-dkms_4.1.0.0+0~mr4.1.0.0_all.deb

Now Installation is completed need to run the rtp engine. We need to edit the /etc/default/ngcp-rtpengine-daemon file..

Configuring RTPEngine:

So edit that file to suit your Environment.

RUN_RTPENGINE=yes
LISTEN_TCP=25060
LISTEN_UDP=12222
LISTEN_NG=22222
LISTEN_CLI=9900
INTERFACES=”x.xx.xx.xx”
LOG_LEVEL=6

Running RTPEngine:

Now start the rtpengine using above init script.

/etc/init.d/ngcp-rtpengine-daemon restart
or
rtpengine –interface=192.168.18.20 –listen-ng=127.0.0.1:22222  -m 30000 -M 35000

Check if rtpengine started or not by running below command

ps -ef | grep ngcp-rtpengine

That’s It.. you successfully installed RTPEngine on Debian Ubuntu 14.04. It is ready to accept the requests from Kamailio and Opensips and also configure your kamailio or opensips RTPENGINE_SOCK parameter properly.

If you got any problem, Feel free to drop a comment.

Venkatesh

Hi Guys, I am Venkatesh. I am a programmer and an Open Source enthusiast. I write about programming and technology on this blog.

You may also like...

9 Responses

  1. Parveen Jangra says:

    Hi , I followed all your steps but still i am unable to start the rtpengine, could you please help to get this resolved.

    parveen@parveen-NUC7i7BNH:/usr/local/src$ journalctl -xe

    — The job identifier is 4954.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: motd-news.service: Succeeded.
    — Subject: Unit succeeded
    — Defined-By: systemd
    — Support: http://www.ubuntu.com/support

    — The unit motd-news.service has successfully entered the ‘dead’ state.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: Finished Message of the Day.
    — Subject: A start job for unit motd-news.service has finished successfully
    — Defined-By: systemd
    — Support: http://www.ubuntu.com/support

    — A start job for unit motd-news.service has finished successfully.

    — The job identifier is 4887.
    Jun 13 12:37:14 parveen-NUC7i7BNH kernel: Registering xt_RTPENGINE module – version 11.0.0.0+0~mr11.0.0.0
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[43340]: ngcp-rtpengine-daemon.service: Failed to apply ambient capabilities (before UID change): Operation not permitted
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[43340]: ngcp-rtpengine-daemon.service: Failed at step CAPABILITIES spawning /usr/bin/rtpengine: Operation not permitted
    — Subject: Process /usr/bin/rtpengine could not be executed
    — Defined-By: systemd
    — Support: http://www.ubuntu.com/support

    — The process /usr/bin/rtpengine could not be executed and failed.

    — The error number returned by this process is ERRNO.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: ngcp-rtpengine-daemon.service: Main process exited, code=exited, status=218/CAPABILITIES
    — Subject: Unit process exited
    — Defined-By: systemd
    — Support: http://www.ubuntu.com/support

    — An ExecStart= process belonging to unit ngcp-rtpengine-daemon.service has exited.

    — The process’ exit code is ‘exited’ and its exit status is 218.
    Jun 13 12:37:14 parveen-NUC7i7BNH kernel: Unregistering xt_RTPENGINE module
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: ngcp-rtpengine-daemon.service: Failed with result ‘exit-code’.
    — Subject: Unit failed
    — Defined-By: systemd
    — Support: http://www.ubuntu.com/support

    — The unit ngcp-rtpengine-daemon.service has entered the ‘failed’ state with result ‘exit-code’.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: Failed to start NGCP RTP/media Proxy Daemon.
    — Subject: A start job for unit ngcp-rtpengine-daemon.service has failed
    — Defined-By: systemd
    — Support: http://www.ubuntu.com/support

    — A start job for unit ngcp-rtpengine-daemon.service has finished with a failure.

    — The job identifier is 4954 and the job result is failed.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: Reloading.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: /lib/systemd/system/ngcp-rtpengine-daemon.service:23: Unknown key name ‘ProcSubset’ in section ‘Service’, ignoring.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: /lib/systemd/system/ngcp-rtpengine-daemon.service:50: Unknown key name ‘ProtectProc’ in section ‘Service’, ignoring.
    Jun 13 12:37:14 parveen-NUC7i7BNH systemd[1]: /lib/systemd/system/ngcp-rtpengine-daemon.service:115: Unknown key name ‘SystemCallLog’ in section ‘Service’, ignoring.
    Jun 13 12:37:16 parveen-NUC7i7BNH sudo[43222]: pam_unix(sudo:session): session closed for user root

  2. We also need
    apt-get install libavfilter-dev
    apt-get install libjson-glib-dev

  3. Serhat Guler says:

    Hi,

    Thank a lot for the tutorial, really well done. I have installed it successfully, but running into a problem when running it. It gives an error as: CRIT: Fatal error: Bad command line: Key file does not have group 'rtpengine'

    Any ideas ?
    Cheers.

  4. Need apt-get install libpcap0.8-dev also

  5. We need apt-get install libevent-dev also.

  6. Stefano says:

    It's works for 16.04 LTS too. Great guide!

  7. we need apt-get install libhiredis-dev also.

    • Shadul Ahemad Shekh says:

      Hi thanks for this tutorial can you tell me how to check logs of rtpengine

  8. Unknown says:

    Perfect ! Thank you for this howto

Leave a Reply