Media Proxy

MediaProxy Features

MediaProxy Comparison

Written by Dan Pascu

Mediaproxy is a NAT Traversal solution for SIP Express Router (SER).


- Distributed geographical location
- Scalability, load balancing and redundancy
- Real-time sessions statistics
- Configurable IP and UDP port range
- Support for audio and video streams
- Support for multiple media streams per call
- Accounting of network traffic


Please report bugs to Before reporting bugs, please read
the mailing list archives (
to make sure your questions have not already been answered.

MediaProxy is developed and supported by AG Projects. AG Projects
offers best-effort gratis support for MediaProxy. "best-effort" means that
we try to solve the bugs you report or help fix your problems as soon as we
can, subject to available resources.

Commercial support

For commercial support, please contact
AG Projects

If you have a support contract, please login with your account at and create a trouble-ticket with your


- ser version 8.12 or greater
- python 2.2 or newer, 2.3 is recommended.
for python versions older than 2.3, the python-optik module
(version 1.4.1 or newer) is required.

MediaProxy consists of three components:

1. is the SER module
2. does distribution and load balancing of SER request
3. is the Media Proxy server

The first two components must run on the same machine where SER runs.
The third component may run either on the same machine or on (multiple)
remote servers.

For details about the mediaproxy architecture please read the included README
file as well as the Readme file from the mediaproxy module from SER.
Details about command line options for the programs can be found in the
Readme file as well. A summary of the command line options is displayed by
each command when using the -h or --help command line option.

For CVS:

cd sip_router
cvs update -Pd

check that you have the modules/mediaproxy directory

make clean # clean old files in case you haven't updated cvs for a long time
make install

For stable tree:

copy the directory modules/mediaproxy from development tree
and run a make clean inside it. then recompile the module issuing "make" in
that directory. Copy the module to /usr/lib/ser/modules/ser/

For both cases, copy the 2 files listing asymmetric clients from
modules/mediaproxy/config to /etc/ser/

To configure the mediaproxy module in the ser.cfg file please check the
Readme included with the mediaproxy module (available in the SER
modules/mediaproxy directory). Also checkthe example ser.cfg file included
there too.

Installation of mediaproxy dispatcher and server

Download the Mediaproxy dispatcher and server from

Unpack the archive in /usr/local/ (all necessary files will be under the
mediaproxy/ subdirectory).

Copy the startup script (depending on your platfrom) from
/usr/local/mediaproxy/boot/ to /etc/init.d/mediaproxy
Edit the script to add the options you need for the proxy server and the
dispatcher By default the script starts both a dispatcher and a proxy server
on the host. Should you only need one of them comment the other.

Make the necessary symlinks in the rc?.d directories in etc if you want it to
start at boot time. For debian this can be easily accomplished by running:

update-rc.d mediaproxy defaults 20 90

Run as root: /etc/init.d/mediaproxy start

Add DNS SRV records in the for the SIP domains you wish to serve.
Put them at the same priority with different weights to allow load balancing
of traffic. Put them at different priorities to allow fallback.


Considering your domain is and you wan to dedicate 3 main
servers and 2 fallbacks. The main servers you want to distribute traffic
among are 2 1Ghz machines (named nat1 and nat2) and a 2Ghz machine (nat3).
You want 25% from the traffic to go to each 1Ghz machine and 50% to the 2Ghz
machine. For the fallbacks (nat4 and nat5) you want to distribute the
traffic equally among the 2 machines. IN SRV 0 25 25060 IN SRV 0 25 25060 IN SRV 0 50 25060 IN SRV 10 50 25060 IN SRV 10 50 25060

If your DNS provider does not support SRV records, take a look at Managed

In this setup, the traffic will be distributed between the nat1, nat2 and
nat3 machines in a proportion of 25%+25%+50%. If one goes offline the other
2 will take it's traffic share redistributing the load balancing according
to their own weight. If all of nat1, nat2, nat3 stop responding, nat4 and
nat5 will be used distributing the traffic among them equally (50%+50%)
Created by: busywiki, Last modification: Tue 09 of Apr, 2013 (12:48 UTC) by cervajs
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+