[asterisk-users] RTP over TCP
Matt Riddell
lists at venturevoip.com
Wed Apr 28 20:44:37 CDT 2010
On 25/04/10 7:00 AM, bruce bruce wrote:
> Adobe Air and Adobe FMS are good examples of VoIP working flawlessly
> over TCP. We are actually developing a flash phone which needs only TCP
> to transmit both signal and audio.
Ok, let's look at that (UDP vs TCP for realtime stream). Let's call the
sender A and the received B.
UDP
===
A sends packet 1 to B. Arrives ok. No problem
A sends packet 2 to B. Doesn't arrive. No problem (dropped packet)
A sends packet 3 to B. Doesn't arrive. No problem (dropped packet)
A sends packet 4 to B. Arrives ok. No problem
TCP
===
A sends packet 1 to B. Arrives ok. No problem
A sends packet 2 to B. Doesn't arrive. TCP starts retransmit
A sends packet 3 to B. Doesn't arrive. TCP starts retransmit
A sends packet 2 to B. Arrives but is now 20ms too late (dropped packet)
A sends packet 4 to B. Arrives ok. No problem
A sends packet 3 to B. Arrives but is now 20ms too late (dropped packet)
So, in the worst state of the network (when packets aren't getting
though), TCP is sending even more data than is required for the actual
conversation. And it's doing this at a time when the network is struggling.
If we assume that there is a jitter buffer on B which is throwing away
packets which are out of order then it's going to somewhat improve the
situation. If it's not then it's going to be a disaster!
Most of the flash based conferencing solutions (voice/video) I've used
have all had the same problem (increasing delay and over utilisation of
bandwidth).
The reason people are using TCP for this is because flash doesn't allow
you to do it with UDP.
However, IIRC Adobe is working on a UDP based protocol for exchanging
real time data and this should resolve the situation.
If there is a great multiplexing video conferencing app which uses flash
(or similar) that you can recommend, I'd love to know about it!
Moral of the story:
UDP is designed for realtime traffic or data where timing is more
important than accuracy
TCP is designed for important data (i.e. where accuracy is more
important than timing)
--
Cheers,
Matt Riddell
Managing Director
_______________________________________________
http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/exchange.php (Full ITSP Solution)
http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)
More information about the asterisk-users
mailing list