table of contents
RTPPROXY(8) | [FIXME: manual] | RTPPROXY(8) |
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]] [-m min_port] [-M max_port] [-u uname[:gname]] [-F] [-i] [-n timeout_socket] [-P] [-a] [-d log_level[:log_facility]]
DESCRIPTION¶
rtpproxy is a symmetric RTP proxy designed to be used in conjunction with the SIP Express Router (SER) or any other SIP proxy or SIP B2BUA 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¶
-?
-2
-f
-v
-l addr1[/addr2]
-6 addr1[/addr2]
-s ctrl_socket
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.
Example: -s udp6:::1:9000
Example: -s unix:/var/run/rtpproxy.sock
Default value is /var/run/rtpproxy.sock.
-t tos
-r rec_dir
-S spool_dir
-R
-p pid_file
-T max_ttl
-m min_port
-M max_port
-u uname[:gname]
-F
-i
-n timeout_socket
Example: -n unix:/var/run/rtpproxy_timeout.sock
There is no default value, notifications are not sent and not permitted unless a value is specified explicitly.
-P
-a
-d log_level[:log_facility]
The optional log_facility parameter sets syslog(3) facility assigned to log messages.
Example: -d WARN:LOG_LOCAL5
The default level in foreground mode is is DBUG, in background - WARN and facility is LOG_DAEMON.
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://www.rtpproxy.org/.
SEEALSO¶
ser(8).
AUTHOR¶
Maxim Sobolev
COPYRIGHT¶
CopyrightCopyright © 2006 janakj
June 16, 2008 | [FIXME: source] |