Skip to content

Install RTPEngine on Centos 7

tarsepav edited this page Aug 31, 2023 · 10 revisions

Install the packages required to compile RTP engine:

  • yum install iptables-devel kernel-devel kernel-headers xmlrpc-c-devel
  • yum install "kernel-devel-uname-r == $(uname -r)"
  • yum install glib glib-devel gcc zlib zlib-devel openssl openssl-devel pcre pcre-devel libcurl libcurl-devel xmlrpc-c xmlrpc-c-devel
  • yum install libevent-devel glib2-devel json-glib-devel gperf libpcap-devel git hiredis hiredis-devel redis perl-IPC-Cmd

MariaDB ver 10+

  • yum install mariadb-devel mariadb-client mariadb-shared

Spandsp

  • yum install spandsp-devel spandsp

epel

  • yum install epel-release

ffmpeg

check for Nux desktop repo by yum repolist

  • yum -y install ffmpeg ffmpeg-devel

Get The Latest Release Of RTPEngine Source From RTPEngine’s GitHub Repository:

Compile and install the daemon

  • cd /usr/local/src/rtpengine/daemon/
  • make
  • cp rtpengine /usr/sbin/rtpengine

Compile and install iptables extension

  • cd /usr/local/src/rtpengine/iptables-extension

  • make all

  • cp libxt_RTPENGINE.so /usr/lib64/xtables/.

Compile and install the kernel module xt_RTPENGINE

  • cd /usr/local/src/rtpengine/kernel-module
  • make

determine kernel release

  • uname -a

  • Linux kcgs2-ce1.cpe.syntec.co.uk 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  • cp xt_RTPENGINE.ko /lib/modules/3.10.0-957.5.1.el7.x86_64/extra/xt_RTPENGINE.ko

  • depmod -a

load module at boot time

  • vi /etc/modules-load.d/rtpengine.conf (add the following lines)
  • # load xt_RTPENGINE module
  • xt_RTPENGINE

load the module and check

  • modprobe xt_RTPENGINE
  • lsmod | grep xt_RTPENGINE

check files

  • ls -l /proc/rtpengine/control
  • ls -l /proc/rtpengine/list

add forwarding table with an ID=$TableID. $TableID is a number between 0-63

  • echo 'add 0' > /proc/rtpengine/control

Adding iptables rules to forward the incoming packets to xt_RTPENGINE module

  • iptables -I INPUT -p udp -j RTPENGINE --id $TableID
  • ip6tables -I INPUT -p udp -j RTPENGINE --id $TableID

Updated and more complete guide: https://blog.kolmisoft.com/rtpengine-install-on-centos-7/