Menu Close

Builiding RTPproxy server 1.2.1 from GIT on debian lenny

As the result of the testing, the rtpproxy 1.2.1 builded using git is faulted, see the end of the article or article about kamamilio nat traversal with rtpproxy.

 

The article describe how to install the rtpproxy server, version 1.2.1, from the source. We need this server as a part of the NAT traversal solution realized with Kamailio and rtpproxy.

Info from the RTPproxy site:

The Sippy RTPproxy is a high-performance software proxy server for RTP streams that can work together with our Kamailio server. 

The main purpose of RTPproxy originally had been to make the communication between SIP user agents behind NAT(s) (Network Address Translator) possible. Several cases existed when direct end-to-end communication is not possible and RTP streams have to be relayed through another host. The RTPproxy can be used to setup such a relaying host.

Download source code

We will use the latest version of the rtpproxy server, because the latest version included in apt repository of debian lenny is 1.1.2. For source download we will use the git

Because i have no git installed I will install it

apt-get install git-core

Then we download the source code to your preferred folder

git clone git://sippy.git.sourceforge.net/gitroot/sippy/rtpproxy

Compilation and installation

Go to the folder where the source code was downloaded

./configure 

Configure failed cause I have no proper compiler, I install it

apt-get install gcc

and run ./configure again, now it works. And now we will start rest

make
make install

 Configuration

The rtpproxy server may communicate with Kamailio using the linux or UDP socket, thus mean that rtpproxy may run on the same machine as Kamailio or on another server.

Open the file /etc/default/rtpproxy and add line

CONTROL_SOCK="unix:/var/run/rtpproxy/rtpproxy.sock"

to use unix socket for the communication with kamailio, or uncomment

CONTROL_SOCK=udp:127.0.0.1:22222

to use the UDP socket.

 

Optionally, if we are using firewall, and we opened some ports for RTP media stream in our firewalls. So we may define to the rtpproxy to use this ports, to achieve this add

EXTRA_OPTS="-m 16384 -M 32767"

Testing with kamailio 3.1

  1. On debian lenny, you have to edit /etc/init.d/rtpproxy script because it is pointing to other folder as the rtpproxy binary is. By default it is pointing to the /usr/sbin, but after compilation the binary is in /usr/local/bin.
  2. Other problem, using rtpproxy 1.2.1 with kamalio 3.1.x lead to segmentation fault…so version 1.2.1 is for this case unusable fo us.
Dec  3 11:29:23 pstest /usr/sbin/kamailio[5567]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading
Dec  3 11:29:34 pstest kernel: [1285797.388217] rtpproxy[5529]: segfault at 0 ip 409468 sp 7fffe8208d70 error 4 in rtpproxy[400000+f000]
Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.