[OpenSER-Users] mediaproxy server NEW FEATURE!!!

Gonzalo J. Sambucaro gonzalo.sambucaro at mslc.com.ar
Fri Feb 22 18:53:06 CET 2008


Folks,
      I developed a new feature in the Media Proxy project of AG-Proyect.
With this new feature the Media Proxy Server is now able to manage the
problem of the NAT IP change in an established call. It is
currently in production and working without any problem.

Somebody wants to test it?

I would like to know what to do to make this feature available to
everybody. Does anybody know?

Regards,

------------------------------

Details:
-------
      Supose that there is an established rtp connection between two
endpoints and the media proxy is in the middle doing the relay of
the rtp streams, let´s say

(MP = mediaproxy)

EP A <--------->[NAT with IP1]<-----------> MP <--------------------> EP B

EP A sends rtp to MP_IP:MP_PORT  passing through the NAT box.
EP B sends rtp to MP_IP:MP_PORT  without passing through a NAT box.

The MP know that the caller = NAT_IP1:NAT_PORT1, and the called =
EP_B_IP:EP_B_PORT

Now, supose that the NAT box change their PUBLIC IP from IP1 to IP2, so
this escenary

EP A <------->[NAT with IP1]<---------> MP <-------------> EP B

will change to this

EP A <------->[NAT with IP2]<---------> MP <--------------> EP B

so the MP should detect that change of IPs and continue relaying the rtp
streams but now to IP2:PORT2 instead of IP1:PORT1.

Well, that was the situation y have experienced.

To fix this, I developed this solution, changing rtphandler.py file:

1) When the first rtp packet of a source arrives, save the SSRC field in
the MP.
 - Save the SSRC of the caller.
 - Save the SSRC of the called.

2) If arrives a rtp packet with unknown source IP but with the same SSRC
field of some of the two streams, updates the binding (with the new IP
detected) between the caller and the MP or between the called and the MP
according to the field SSRC previously saved.

Note: SSRC (RFC 3550 RTP),  (from the rfc: "The SSRC identifier carried in
the RTP header and in various fields of RTCP packets is a random 32-bit
number that is required to be globally unique within an RTP session ")

--------------------------------

-- 
Gonzalo J. Sambucaro
Ingeniería de Software
Tel: +54-341-4230504
MSLC
gonzalo.sambucaro at mslc.com.ar
www.mslc.com.ar
Ocampo y Esmeralda - Vivero de Empresas de Base Tecnológica
Ciudad Universitaria Rosario UNR, CCT CONICET
Rosario - Santa Fé - Argentina



-- 
Gonzalo J. Sambucaro
Ingeniería de Software
Tel: +54-341-4230504
MSLC
gonzalo.sambucaro at mslc.com.ar
www.mslc.com.ar
Ocampo y Esmeralda - Vivero de Empresas de Base Tecnológica
Ciudad Universitaria Rosario UNR, CCT CONICET
Rosario - Santa Fé - Argentina





More information about the Users mailing list