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.
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 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
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
to use unix socket for the communication with kamailio, or uncomment
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
- 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.
- 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: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading Dec 3 11:29:34 pstest kernel: [1285797.388217] rtpproxy: segfault at 0 ip 409468 sp 7fffe8208d70 error 4 in rtpproxy[400000+f000]