NAME
rtpproxy - RTP (Real-time Transport Protocol) Proxy Server
SYNOPSIS
rtpproxy [-?] [-2] [-f] [-v] [-R] [-l addr1[/addr2]] [-6 addr1[/addr2]]
[-s ctrl_socket] [-t tos] [-p pidfile] [-T max_ttl]
[-r rdir [-S sdir]]
DESCRIPTION
rtpproxy is a symmetric RTP proxy designed to be used in conjunction
with the SIP Express Router (SER) or any other SIP proxy capable of
rewriting SDP bodies in SIP messages that it processes.
The main purpose of rtpproxy is to make the communication between SIP
user agents behind NAT(s) (Network Address Translator) possible.
Several cases exists when direct end-to-end communication is not
possible and RTP streams have to be relayed through another host.
Rtpproxy can be used to setup such a relaying host.
When two listen interfaces have been specified using the command line
parameters described below then rtpproxy will enter so called bridging
mode. In briding mode rtpproxy forwards RTP packets received on one
interface to the other interface and vice versa. This mode can be used
to forward RTP packets between networks without direct network level
connectivy (provided that the host running rtpproxy has one interface
in both of them). One particular application of bridging mode is
IPv4/IPv6 traversal of RTP packets.
When instructured by SER rtpproxy can also record the entire RTP
session in a file on a local harddisk or play a pre-recorded file to
the user agent (so called Music-on-Hold).
OPTIONS
-?
Show summary of options.
-2
Send every RTP packet twice in sessions that use low-bitrate
codecs. Only packets that are smaller than 128 bytes will be sent
twice. This option can improve audio quality on lossy links.
-f
Rtpproxy will stay in foreground mode if this option is set.
-v
Show version of program.
-l addr1[/addr2]
IPv4 listen IP address(es). You can specify either one or two
addresses. If two addresses have been specified then rtpproxy will
work in bridging mode.
-6 addr1[/addr2]
IPv6 listen IP address(es). You can specify either one or two
addresses. If two addresses have been specified then rtpproxy will
work in bridging mode.
-s ctrl_socket
This parameter configures rtpproxy control socket. The control
socket is used by nathelper module of SER to create/modify/delete
RTP sessions to be relayed. Format of ctrl_socket is
<type>:<socket>. Following types are supported:
· udp: Create UDP control socket. In this mode RTPProxy will
listen on UDP for control messages from SER/nathelper.
Example: -s udp:127.0.0.1:9000
IP address can be ´*´ in which case rtpproxy will listen on all
local interfaces. If omitted port 22222 is used.
Note
RTPProxy control protocol has no built-in security
mechanisms. Make sure that you protect the listening IP and
port properly when using RTPProxy with UDP control socket.
· udp6: Create IPv6 UDP control socket. In this mode RTPProxy
will listen on UDP/IPv6 for control messages from
SER/nathelper.
Example: -s udp6:::1:9000
· unix: Create UNIX domain socket for control interface. In this
mode SER/nathelper and RTPProxy must be running on the same
host. This is the default setting for both SER/nathelper and
rtpproxy.
Example: -s unix:/var/run/rtpproxy.sock
Default value is /var/run/rtpproxy.sock.
-t tos
Set this ToS (Type of Service) in outgoing packets. Default
value is 0xB8.
-r rec_dir
Directory where recorded RTP sessions will be stored.
-S spool_dir
Spool directory for RTP sessions being recorded. The file will
be moved to directory configured in -r option after the session
finishes.
-R
Do not record RTCP when recording an RTP session. This option
is disabled (rtpproxy will record RTCP) by default.
-p pid_file
This parameter configures the name of the file where PID of
running rtpproxy will be stored. Default is
/var/run/rtpproxy.pid.
-T max_ttl
Limit the maximum TTL (Time To Live) of outgoing IP packets to
the value of max_ttl.
HOWITWORKS
When SER receives an INVITE request, it extracts Call-ID from it and
communicates it to rtpproxy via Unix domain socket or UDP. Rtproxy
looks for an existing session with such Call-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 SER. After
receiving reply from the proxy, SER replaces media ip:port in the SDP
to point to the proxy and forwards request as usually.
When SER receives a 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 proxy,
SER replaces media ip:port in the SIP reply to point to the proxy and
forwards reply as usually.
After the session has been created, the proxy listens on the port it
has allocated for that session and waits for receiving at least one UDP
packet from each of two parties participating in the call. Once such
packet is received, the proxy fills one of two ip:port structures
associated with each call with 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).
FILES
/usr/sbin/rtpproxy
LICENSE
This program is licensed under the BSD license. See COPYING file in the
rtpproxy sources for details.
AVAILABILITY
The latest version of this program can be found at
http://ftp.iptel.org/pub/rtpproxy.
SEEALSO
ser(8).
AUTHOR
Maxim Sobolev
Author.
COPYRIGHT
Copyright © 2006 janakj
[FIXME: source] Feb 20, 2006