20.09.2021

RTPENGINE + G729 DEBIAN 10.10 and Debian 11

apt update
apt upgrade -y
apt install -y linux-headers-$(uname -r) linux-image-$(uname -r)

##reboot

mkdir /opt/rtpengine

cd /opt/rtpengine

apt install -qqy git curl mariadb-server libmosquitto-dev libwebsockets-dev python3-websockets apt-utils devscripts dpkg-dev debhelper iptables iptables-dev libcurl4-openssl-dev libglib2.0-dev libavcodec-extra libhiredis-dev libpcre3-dev libssl-dev libxmlrpc-core-c3-dev markdown zlib1g-dev module-assistant dkms gettext default-libmysqlclient-dev gperf libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbencode-perl libcrypt-openssl-rsa-perl libcrypt-rijndael-perl libdigest-crc-perl libdigest-hmac-perl libevent-dev libio-multiplex-perl libio-socket-inet6-perl libjson-glib-dev libnet-interface-perl libpcap0.8-dev libsocket6-perl libswresample-dev libsystemd-dev nfs-common netcat-openbsd netcat unzip libconfig-tiny-perl libspandsp-dev**

git clone https://github.com/sipwise/rtpengine.git .
cp etc/rtpengine.sample.conf /etc/rtpengine/rtpengine.conf

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


export DEBIAN_FRONTEND=noninteractive

apt-get update -qqy

mkdir -p ./debian/flavors

touch ./debian/flavors/no_ngcp


dpkg-checkbuilddeps

dpkg-buildpackage -b -us -uc

dpkg -i ../*.deb

**manual edit: /etc/rtpengine/rtpengine.conf: set your IPs.

If you want to add webrtc2sip feature use next lines

certbot certonly -d webrtc.domain.com

**manual edit: kamailiorc: uncomment db engine string

kamdbctl create kamailio 


download template kamailio.cfg, tls.cfg and kamailio_local.cfg 

(git clone https://bitbucket.org/erewin/webrtc2sip-template.git)

systemctl start rtpengine
systemctl start kamailio

To make the same on Debian 11

#!/usr/bin/sh
apt update
apt upgrade

#here you have reboot

#!/usr/bin/sh
mkdir /opt/rtpengine

cd /opt/rtpengine

apt-get install git curl -y

apt-get install libmosquitto-dev libwebsockets-dev python3-websockets apt-utils dpkg-dev debhelper iptables libxtables-dev libip6tc-dev libip4tc-dev libcurl4-openssl-dev libglib2.0-dev libavcodec-extra libhiredis-dev libpcre3-dev libssl-dev libxmlrpc-core-c3-dev markdown zlib1g-dev module-assistant dkms gettext default-libmysqlclient-dev gperf libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbencode-perl libcrypt-openssl-rsa-perl libcrypt-rijndael-perl libdigest-crc-perl libdigest-hmac-perl libevent-dev libio-multiplex-perl libio-socket-inet6-perl libjson-glib-dev libnet-interface-perl libpcap0.8-dev libsocket6-perl libswresample-dev libsystemd-dev nfs-common netcat-openbsd netcat unzip libconfig-tiny-perl libspandsp-dev
#debian 11
apt install libxtables-dev libip6tc-dev libip4tc-dev libiptc-dev

apt install -y linux-headers-$(uname -r) linux-image-$(uname -r)

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


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


export DEBIAN_FRONTEND=noninteractive

apt-get update -qqy

mkdir -p ./debian/flavors

touch ./debian/flavors/no_ngcp


dpkg-checkbuilddeps

dpkg-buildpackage -b -us -uc

dpkg -i ../*.deb

21.04.2021

Kamailio and Opensips

This is the list of completed solutions based on Kamailio\opensips.

KAMAILIO:

WEBRTC2SIP server – using kamailio + rtpengine, makes possible to use webphone based on webrtc to using common SIP servers

  • transfer between SIP and WEBRTC protocols and vice versa.
  • transconding g729 to g711

LoadBalancer – using only kamailio without DBs, makes loadbalancing between asterisks servers.

SBC – using kamailio and sql DBs for manage incoming traffic to asterisk, placed before asterisk on same PC.

  • insert custom headers
  • block hackers traffic
  • manage CPS and monitoring tools
  • control PDD of calls

OPENSIPS:

Redirect server – working with billing software JERA. Makes simultaneously outbound calls based on redirect messages from billing.

  • control CPS for customers
  • block unwanted traffic
  • monitoring online calls with custom dashboard
  • make CDRs for insert into billing

Failover server – makes possible to switch between 2 opensips servers without loosing online calls.

19.12.2019

WEBRTC2SIP. KAMAILIO. RTPENGINE. CENTOS 7.

Полная статья по инсталляции webrtc2sip на centos 7 здесь. А тут видео.

В качестве основы эту статью и компиляцию вручную. В целом компиляция особых проблем не вызвала. Пакеты все которые надо ставятся.

Проблема возникла при инсталляции в качестве сервиса.

а) не стал разбираться с правами и запускаю от root,
б) необходимо убрать из rtpengine.services параметры из окружения,

Было:

ExecStart=/usr/sbin/rtpengine --config-file=${CFGFILE} --interface=${INTERFACE} --listen-ng=${LISTEN_UDP} --log-facility=${LOG_FACILITY} --log-level=${LOG_LEVEL}

Стало:

ExecStart=/usr/sbin/rtpengine --pidfile /run/rtpengine.pid --config-file /etc/rtpengine/rtpengine.conf --table 0

в) учесть имена pid файла, он должен совпадать в /etc/rtpengine/rtpengine.conf , /etc/sysconfig/rtpengine , rtpengine.service – последний файл можно найти командой systemctl status rtpengine.service.

Помощь с ошибками:

webrtc console:  Called with SDP without DTLS fingerprint. - для моей версии rtpengine, необходимо было использовать ICE=force, без этого флага rtpengine не добавлял fingerprint в SDP. возможно в новых версиях rtpengine всё уже в порядке.