Showing posts with label RTPproxy. Show all posts
Showing posts with label RTPproxy. Show all posts

Thursday, 22 January 2015

RTP Proxy Installation From Source



Basic Steps in RTP Proxy Installation:
This is a rookie guide for people running Ubuntu 9.04, have OpenSIPS 1.5.2 installed on their server, and wanted to implement RTPProxy as media server.

If your already have basic knowledge you can skip the basic steps and proceed to expert installation steps…

Objectives:
1. Package/Dependencies Installation
2. RTPProxy Installation
3. OpenSIPS 1.5.2 Configuration
4. Database MySQL 5.0.51a Configuration

Assumptions:
- OpenSIPS 1.5.2 (latest version) Installed.
– UDP/Media ports* are open on your router.
(Configure Router for the Ports to be used by rtpproxy by opening them first.)

Use dpkg command to list installed software and follow the codes listed bellow:

$ dpkg –get-selections
$ mkdir /backup
$ dpkg –get-selections > /backup/installed-software.log
$ cd /usr/src
$ wget http://b2bua.org/chrome/site/rtpproxy-1.2.0.tar.gz
$ tar -xzvf rtpproxy-1.2.0.tar.gz

Change to the directory and install the program
$ cd rtpproxy-1.2
$ ./configure
$ make
$ make install

Create a system user with no privileges and start the daemon running
$ adduser rtpproxy
$ rtpproxy -u rtpproxy

Now rtpproxy should be running and if you check in /var/run you should see rtpproxy.sockand rtpproxy.pid

Running Manually:
$ rtpproxy -l 192.168.1.109 -s udp:127.0.0.1:50000 -u usrname &
OR
$ rtpproxy -s udp:127.0.0.1:50000 -f -u opensips -l 192.168.1.109 &

Consideration:
Creating the user rtpproxy was not essential, you can run the daemon under whatever user you are logged in as by simply typing rtpproxy at the command but I read that it is safe practice to run the daemon under a non privileged user. (Maybe someone can comment on the linux user I added. I am not 100% on the security of the user added with no password but the way I understand it the user cannot access the system until a password is created.)

Thursday, 5 June 2014

RTP proxy installation from debian Package and Configuration

About RTPproxy :

The RTPproxy is a high-performance software proxy for RTP streams that can work together with SER, OpenSER or Sippy B2BUA. Originally created for handling NAT scenarious it can also act as a generic media relay as well as gateway RTP sessions between IPv4 and IPv6 networks. RTPproxy was developed by Maxim Sobolev and now is being actively maintained by the Sippy Software, Inc..

The RTPproxy supports some advanced features, such as remote control mode, allowing building scalable distributed SIP VoIP networks. The nathelper module included into the SER or OpenSER SIP Proxy software as well as Sippy B2BUA allow using multiple RTPproxy instances running on remote machines for fault-tolerance and load-balancing purposes.

Installation :

apt-get install rtpproxy

Now it will create one file in /etc/init.d/ folder this is init file we need configure this file. other file is /etc/default/rtpproxy file.

Configuring /etc/init.d/rtpproxy :

/etc/init.d/rtpproxy file look like this.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=rtpproxy
GROUP_USER=opensips
DESC="RTP relay"
DAEMON=/usr/bin/$NAME
USER=$NAME
GROUP=$GROUP_USER
PIDFILE="/var/run/$NAME/$NAME.pid"
PIDFILE_DIR=`dirname $PIDFILE`
CONTROL_SOCK="udp:127.0.0.1:7890"
IP_ADDR="your server IP Address" 

edit CONTROL_SOCK and IP_ADDR and also check DAEMON path is it pointing to correct location or not.

Starting Rtpproxy :


/etc/init.d/rtpproxy start

Checking :

check if rtpproxy is running or not by below command.
ps -ef | grep rtpproxy                                                                                                                        
it will show output like this

rtpproxy 936 0 21:43 ? 00:00:00 /usr/bin/rtpproxy -l  YourSERVERIP -s udp:127.0.0.1 7890 -u rtpproxy opensips -p /var/run/rtpproxy/rtpproxy.pid

Congratulations your successfully configured RTP proxy.

RTP proxy and How RTP proxy works ?? (source:VOIP-INFO)


About RTPproxy :

The RTPproxy is a high-performance software proxy for RTP streams that can work together with SER, OpenSER or Sippy B2BUA. Originally created for handling NAT scenarious it can also act as a generic media relay as well as gateway RTP sessions between IPv4 and IPv6 networks. RTPproxy was developed by Maxim Sobolev and now is being actively maintained by the Sippy Software, Inc..

                  The RTPproxy supports some advanced features, such as remote control mode, allowing building scalable distributed SIP VoIP networks. The nathelper module included into the SER or OpenSER SIP Proxy software as well as Sippy B2BUA allow using multiple RTPproxy instances running on remote machines for fault-tolerance and load-balancing purposes.

The software also supports video relaying and RTP session recording.

How it works :

  • When SIP Proxy receives INVITE request, it extracts call-id from it and communicates it to the proxy via Unix domain socket. RTPProxy looks for an existing sessions with such id, if the session exists it returns UDP port for that session, if not, then it creates a new session, binds to a first empty UDP port from the range specified at the compile time and returns number of that port to a SIP Proxy. After receiving reply from the proxy, SIP Proxy replaces media ip:port in the SDP to point to the proxy and forwards the request as usual;
  • when SIP Proxy receives non-negative SIP reply with SDP it again extracts call-id from it and communicates it to the proxy. In this case the proxy does not allocate a new session if it doesn't exist, but simply performs a lookup among existing sessions and returns either a port number if the session is found, or error code indicating that there is no session with such id. After receiving positive reply from the RTPproxy, SIP Proxy replaces media ip:port in the SIP Proxy reply to point to the proxy and forwards reply as usual;
  • after the session has been created, the proxy listens on the port it has allocated for that session and waits to receive at least one UDP packet from each of the two parties participating in the call. Once these packet are received, the proxy fills one of two ip:port structures associated with each call with the source ip:port of that packet. When both structures are filled in, the proxy starts relaying UDP packets between parties;
the proxy tracks idle time for each of existing sessions (i.e. the time within which there were no packets relayed), and automatically cleans up a sessions whose idle times exceed the value specified at compile time (60 seconds by default).

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

© 2014 VOIP4Learn. WP themonic converted by Bloggertheme9. Powered by Blogger.
TOP