How to Install RTPengine on Rocky Linux

First Enable the CodeReady Builder repository

dnf config-manager --set-enabled crb


Install FFMPEG

dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
dnf makecache
dnf install ffmpeg ffmpeg-devel


Install rtpengine dependencies

dnf --enablerepo=devel install opus-devel libpcap-devel xmlrpc-c-devel libiptcdata-devel
dnf install pkgconfig glib2-devel zlib-devel libcurl libevent-devel iptables-devel kernel-headers kernel-devel gcc hiredis-devel json-glib-devel libswresample-free-devel libavcodec-free-devel libavformat-free-devel perl-IPC-Cmd gperf libwebsockets-devel


Now Download RTPengine

git clone https://github.com/sipwise/rtpengine.git


Compile and install the daemon

cd /usr/src/rtpengine/daemon/
make
cp -fr rtpengine /usr/sbin/rtpengine
cp -fr rtpengine /usr/local/bin/rtpengine


Compile and install iptables extension

cd /usr/src/rtpengine/iptables-extension
make all
cp -fr libxt_RTPENGINE.so /usr/lib64/xtables/.


Compile and install the kernel module xt_RTPENGINE

cd /usr/src/rtpengine/kernel-module
make
cp -fr xt_RTPENGINE.ko /lib/modules/`uname -r`/extra/xt_RTPENGINE.ko
depmod -a
modprobe -v xt_RTPENGINE


Check if the kernel module loaded properly:

lsmod | grep xt_RTPENGINE


Make to load the module at the boot time:

echo "# load xt_RTPENGINE module"  >> /etc/modules-load.d/rtpengine.conf
echo "xt_RTPENGINE" >> /etc/modules-load.d/rtpengine.conf


Check if RTPEngine is accessible:

ls -l /proc/rtpengine/control | grep root

Should see:

–w–w—-. 1 root root 0 Oct 16 10:32 /proc/rtpengine/control

Reference -> https://blog.kolmisoft.com/rtpengine-install-on-centos-7/


Troubleshooting

I was unable to find libiptc.h file. So I have compiled iptables from the source


wget https://www.netfilter.org/projects/iptables/files/iptables-1.8.11.tar.xz
tar xvf iptables-1.8.11.tar.xz
cd iptables-1.8.11
./configure
make 
make install
ln -s /usr/local/include/libiptc /usr/include/.
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH


Enjoy 😉

No comments:

Post a Comment

How to store IOT devices data Using QRYN

Configuring your own MQTT broker with a database offers significant cost advantages over cloud IoT platforms like AWS or Azure. You eliminat...