[VoiceOps] TCP Signaling for SIP Signaling

Brandon Martin lists.voiceops at monmotha.net
Sun Jul 16 22:57:09 EDT 2017


On 07/16/2017 10:28 PM, Colton Conor wrote:
> I know UDP seems to be the gold standard for SIP, and is in use by most
> service providers that are offering hosted voice today. My question is
> why not use TCP instead of UDP for SIP signaling?
>
> ...

My (extremely small, internal use only) deployment uses TCP for 
signalling wherever possible.  As you said, it seems to be more reliable 
and allows the use of TLS.  I can't speak to the implications of a large 
scale deployment.

> What about on the media side? Does the RTP use UDP or TCP? If it uses
> UDP can TCP be used? What about for encryption like SRTP? Is SRTP TCP or
> UDP?

It uses UDP, and that's intentional.  The back-off and repeat 
characteristics of TCP, while useful for reliable transmissions of bulk 
data with no real-time requirements, are detrimental to real-time, 
low-latency communication media.  A single lost packet would cause a 
huge hole in the media during back-off and retransmit only to deliver 
data that's old and has to be dropped by the consumer to restore the 
real-time synchronization with the sender.  It's far better to just 
accept dropped media and either have a short hole in the media or 
attempt to conceal it somehow which many modern CODECs support.  Some 
also support using forward error correction and data timespace 
scrambling to completely reconstruct the original data when there's a 
small amount of packet loss at the cost of slightly higher end-to-end 
latency.

--
Brandon Martin


More information about the VoiceOps mailing list