The Internet runs on two primary types of network connection, known as protocols. These are UDP (User Datagram Protocol) and TCP (Transmission Control Protocol). Both protocols are used ubiquitously within the Internet but are each used for quite different purposes.
The UDP protocol is very simple. It is known as a “datagram”, and works much like a telegram carries messages to physical persons. The UDP packet contains information about the data’s source and destination networks, enabling Internet Service Providers to deliver the packet to its intended recipient.
UDP is a very lightweight protocol, and is, therefore, the preferred transport method for streamed content such as audio and video, as its use reduces bandwidth requirements and latency.
The TCP protocol is used by non-streamed content, such as when fetching web pages or images. TCP is built on top of UDP and provides many additional features, such as packet reliability and packet ordering. However, to achieve these additional features, a typical TCP packet will be larger than its UDP counterpart, thereby making TCP slower and more bandwidth-hungry.
TCP can be used to send streamed content but does so at a cost. TCP transport of audio is sometimes a requirement within networks that refuse UDP packets to pass through its NAT, which is common in very secure environments.
TCP for Audio Transport
When using TCP for audio calls, increased latency will always be a factor. As TCP is larger, more data is required to be sent in order to maintain the audio stream. On top of this, since TCP has its own reliability layer, any packet loss experienced will always result in the TCP protocol requiring retransmission of those lost packets, which further increases bandwidth use and may lead to congestion.
In contrast, using UDP to transport audio, even with packet loss, provides a different experience. Typically, audio codecs used to encode and decode audio into data packets will have their own methods of handling lost packets. For instance, the Opus codec, used by Aircall, has a “Forward Error Correction” mechanism, where it can recreate lost packets using data contained in neighboring packets. This recreation is much faster than requesting lost packets to be re-sent and therefore results in less congestion and a smoother audio experience.
Resolving Issues with Packet Loss on TCP
Packet loss itself is typically an issue with unreliable networks. This unreliability may exist on the local network or somewhere between the network and the media server. Reducing this packet loss may require improving local network conditions, such as switching from wifi connectivity to ethernet, or installing a better quality router and switching equipment. Additionally, changing the Internet transport route using a DNS proxy may also be required.
Note that packet loss using UDP can sometimes be preferable to packet loss with TCP, so enabling UDP for Aircall traffic should be considered.
Still have questions? Please feel free to reach out to the Support Team and we’ll be happy to assist!