1RTPPROXY(8)                                                        RTPPROXY(8)
2
3
4

NAME

6       rtpproxy - RTP (Real-time Transport Protocol) Proxy Server
7

SYNOPSIS

9       rtpproxy [-?] [-2] [-f] [-v] [-R] [-l addr1[/addr2]] [-6 addr1[/addr2]]
10                [-s ctrl_socket] [-t tos] [-p pidfile] [-T max_ttl]
11                [-r rdir [-S sdir]]
12
13

DESCRIPTION

15        rtpproxy  is  a symmetric RTP proxy designed to be used in conjunction
16       with the SIP Express Router (SER) or any other  SIP  proxy  capable  of
17       rewriting SDP bodies in SIP messages that it processes.
18
19
20       The  main  purpose of rtpproxy is to make the communication between SIP
21       user agents behind NAT(s) (Network Address Translator) possible. Sever‐
22       al  cases  exists  when direct end-to-end communication is not possible
23       and RTP streams have to be relayed through another host.  Rtpproxy  can
24       be used to setup such a relaying host.
25
26
27       When  two  listen interfaces have been specified using the command line
28       parameters described below then rtpproxy will enter so called  bridging
29       mode. In briding mode rtpproxy forwards RTP packets received on one in‐
30       terface to the other interface and vice versa. This mode can be used to
31       forward  RTP packets between networks without direct network level con‐
32       nectivy (provided that the host running rtpproxy has one  interface  in
33       both of them). One particular application of bridging mode is IPv4/IPv6
34       traversal of RTP packets.
35
36
37       When instructured by SER rtpproxy can also record the entire  RTP  ses‐
38       sion  in  a file on a local harddisk or play a pre-recorded file to the
39       user agent (so called Music-on-Hold).
40
41

OPTIONS

43       -?     Show summary of options.
44
45
46       -2     Send every RTP packet twice in  sessions  that  use  low-bitrate
47              codecs.  Only  packets  that  are smaller than 128 bytes will be
48              sent twice. This option  can  improve  audio  quality  on  lossy
49              links.
50
51
52       -f     Rtpproxy will stay in foreground mode if this option is set.
53
54
55       -v     Show version of program.
56
57
58       -l addr1[/addr2]
59              IPv4  listen  IP  address(es). You can specify either one or two
60              addresses. If two addresses have been  specified  then  rtpproxy
61              will work in bridging mode.
62
63
64       -6 addr1[/addr2]
65              IPv6  listen  IP  address(es). You can specify either one or two
66              addresses. If two addresses have been  specified  then  rtpproxy
67              will work in bridging mode.
68
69
70       -s ctrl_socket
71              This  parameter  configures rtpproxy control socket. The control
72              socket is used  by  nathelper  module  of  SER  to  create/modi‐
73              fy/delete  RTP  sessions to be relayed. Format of ctrl_socket is
74              <type>:<socket>. Following types are supported:
75
76
77              ·
78                  udp: Create UDP control socket. In this mode  RTPProxy  will
79                 listen on UDP for control messages from SER/nathelper.
80
81                 Example: -s udp:127.0.0.1:9000
82
83                 IP  address  can be '*' in which case rtpproxy will listen on
84                 all local interfaces. If omitted port 22222 is used.
85
86
87                 Note
88
89                 RTPProxy control protocol has  no  built-in  security  mecha‐
90                 nisms.  Make  sure that you protect the listening IP and port
91                 properly when using RTPProxy with UDP control socket.
92
93
94              ·
95                  udp6: Create IPv6 UDP control socket. In this mode  RTPProxy
96                 will   listen   on   UDP/IPv6   for   control  messages  from
97                 SER/nathelper.
98
99                 Example: -s udp6:::1:9000
100
101              ·
102                  unix: Create UNIX domain socket for  control  interface.  In
103                 this  mode  SER/nathelper and RTPProxy must be running on the
104                 same host. This is the default setting for both SER/nathelper
105                 and rtpproxy.
106
107                 Example: -s unix:/var/run/rtpproxy.sock
108
109                 Default value is /var/run/rtpproxy.sock.
110
111       -t tos Set this ToS (Type of Service) in outgoing packets. Default val‐
112              ue is 0xB8.
113
114
115       -r rec_dir
116              Directory where recorded RTP sessions will be stored.
117
118
119       -S spool_dir
120              Spool directory for RTP sessions being recorded. The  file  will
121              be  moved  to directory configured in-r option after the session
122              finishes.
123
124
125       -R     Do not record RTCP when recording an RTP session. This option is
126              disabled (rtpproxy will record RTCP) by default.
127
128
129       -p pid_file
130              This parameter configures the name of the file where PID of run‐
131              ning rtpproxy will be stored. Default is/var/run/rtpproxy.pid.
132
133
134       -T max_ttl
135              Limit the maximum TTL (Time To Live) of outgoing IP  packets  to
136              the value of max_ttl.
137
138

HOWITWORKS

140       When  SER  receives  an INVITE request, it extracts Call-ID from it and
141       communicates it to rtpproxy via Unix  domain  socket  or  UDP.  Rtproxy
142       looks  for an existing session with such Call-ID. If the session exists
143       it returns UDP port for that session, if not, then  it  creates  a  new
144       session,  binds  to  a first empty UDP port from the range specified at
145       the compile time and returns number of that port to a  SER.  After  re‐
146       ceiving  reply from the proxy, SER replaces media ip:port in the SDP to
147       point to the proxy and forwards request as usually.
148
149
150       When SER receives a non-negative SIP reply with SDP it  again  extracts
151       Call-ID  from  it  and  communicates  it to the proxy. In this case the
152       proxy does not allocate a new session if it doesn't exist,  but  simply
153       performs  a  lookup  among  existing sessions and returns either a port
154       number if the session is found, or error code indicating that there  is
155       no session with such id. After receiving positive reply from the proxy,
156       SER replaces media ip:port in the SIP reply to point to the  proxy  and
157       forwards reply as usually.
158
159
160       After  the  session  has been created, the proxy listens on the port it
161       has allocated for that session and waits for receiving at least one UDP
162       packet  from  each  of two parties participating in the call. Once such
163       packet is received, the proxy fills one of two ip:port structures asso‐
164       ciated  with  each  call  with source ip:port of that packet. When both
165       structures are filled in, the proxy starts relaying UDP packets between
166       parties.
167
168
169       The proxy tracks idle time for each of existing sessions (i.e. the time
170       within which there were no packets relayed), and  automatically  cleans
171       up  a  sessions  whose idle times exceed the value specified at compile
172       time (60 seconds by default).
173
174

FILES

176        /usr/sbin/rtpproxy
177
178

LICENSE

180       This program is licensed under the BSD license. See COPYING file in the
181       rtpproxy sources for details.
182
183

AVAILABILITY

185       The  latest  version  of  this  program  can be found at http://ftp.ip
186       tel.org/pub/rtpproxy: http://ftp.iptel.org/pub/rtpproxy.
187
188

SEEALSO

190       ser(8).
191
192

AUTHOR

194       Maxim Sobolev.
195
196
197
198                                 Feb 20, 2006                      RTPPROXY(8)
Impressum