[SR-Users] question about rtpproxy "r" flag

Juha Heinanen jh at tutpro.com
Fri Jul 12 11:48:22 CEST 2013


Alex Hermann writes:

> > rtpproxy_offer and answer functions have "r" flag described as follows:
> > 
> >   r - flags that IP address in SDP should be trusted. Without this flag,
> >   rtpproxy ignores address in the SDP and uses source address of the SIP
> >   message as media address which is passed to the RTP proxy.
> > 
> > how does rtpproxy "use" this ip address?
> 
> It directly starts forwarding packets to it. If you don't use this flag, 
> rtpproxsy will wait until it has received poackets from both parties in the 
> call.

it is not what the above description tells.  it just tells where
rtpproxy takes the address, nothing about when it starts to send
packets.  proper use of rtpproxy or mediaproxy-ng is difficult until
this has been clarified.  waiting for both parties to send something
first, would not work if the other party is muted.

> > if sip message comes from behind nat, ip address in sdp is local
> > address, not the address where rtp packets come from.  and if this
> > request has passed another (e.g. outbound) proxy before hitting the
> > current one, also source address of sip message is not the address where
> > rtp packets come from.  either address thus seems to be useless for
> > rtpproxy.
> 
> You can make the addres more "usefull" by rewriting the address with 
> fix_natted_sdp() on the first proxy the UAC reaches (load-balancer). If you 
> don't have that possibility, maybe you can call fix_natted_sdp() on the proxy 
> itself and call msg_apply_changes() before invoking the rtpproxy.

it would result in double rewrite of the sdp when one motivation of
using mediaproxy-ng is that it does the rewriting only once.  there
should be possibility pass sdp ip address as parameter in offer and
answer calls.

-- juha



More information about the sr-users mailing list