[OpenSIPS-Users] MediaProxy and redirected traffic question

Saúl Ibarra Corretgé saul at ag-projects.com
Tue Apr 12 09:21:58 CEST 2011


On 5/4/11 9:54 PM, Stylianos Papanastasiou wrote:
> Hi everyone,
> I am running opensips with mediaproxy and so the media traffic from my
> two SIP terminals runs through an intermediate machine. Now, I want to
> do some media traffic manipulation so I redirect the incoming traffic to
> some port on the intermediate machine using iptables. Assuming my
> terminals are and and the media-proxy is -
> and the video traffic comes from port 9078 from both terminals I give:
> iptables -t nat -A PREROUTING -i eth0  -p udp -s --sport 9078
> -j REDIRECT --to-port 40000
> iptables -t nat -A PREROUTING -i eth0  -p udp -s --sport 9078
> -j REDIRECT --to-port 40001

MediaProxy does insert contrack rules to direct the traffic, as you 
know, and the fact that you are altering the routing with iptables may 
have serious implications on what happens from that point on. MediaProxy 
told the kernel to redirect packets coming from and port X to port Y, but you introduced another routing rule I don't expect 
packets to 'fork'.

Saúl Ibarra Corretgé
AG Projects

More information about the Users mailing list