Folcks,
The problem
===========
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.
The solution
============
To fix this, I was thinking this solution:
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 ")
What do you think about the solution?
Regards,
--
Gonzalo J. Sambucaro
Ingeniería de Software
Tel: +54-341-4230504
MSLC
gonzalo(a)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