G.729, Opus and end-to-end encryption: what really decides softphone audio
Users only care whether they can hear you. Underneath, codec choice, jitter buffering, echo cancellation and encryption are pulling in four directions at once.
When call quality is poor the first reaction is 'the network is bad'. The real cause may sit in codec selection, jitter buffer policy, echo cancellation parameters, or even resource contention during the encryption handshake.
Codecs: choose correctly before optimising
On modern networks Opus is effectively the default answer: it adapts between narrowband and wideband and outperforms older codecs at low bitrates. Interoperating with the traditional telephone network still drags G.729 in, because a great many carrier trunks accept only that narrowband codec.
That is why open implementations such as bcg729 matter: you do not have to bring in a commercial library for one codec. The price is that transcoding consumes CPU, so the transcoding path has to be costed separately in capacity planning.
Jitter buffering: where experience divides
Network jitter is normal. A buffer that is too small produces dropouts; too large and latency climbs. Good implementations adjust dynamically to measured jitter, and how aggressive that adjustment is decides whether users describe the call as 'clear but slightly delayed' or 'no stutter, sounds like a satellite link'.
Call experience is a continuous choice between latency and continuity.
Echo cancellation
Echo on speakerphone generates the most complaints. It belongs to the media engine and needs tuning against device characteristics. The same parameters that work beautifully on a handset can fail in a conference room speaker.
The price of encryption
SRTP and TLS are standard now, and neither is free: handshakes add setup time and media encryption adds CPU load. On low-end devices or high-density servers that overhead must be assessed in advance.
Worth noting that encryption only protects the transport. True end-to-end encryption needs additional key agreement, and it carries a business cost: the server can no longer record or analyse calls. Whether to adopt it depends on the scenario, not on fashion.
A pragmatic tuning order
Confirm the network path first — any detours, any loss. Then confirm the codec path — any unnecessary transcoding. Then tune the jitter buffer. Only then touch echo cancellation parameters. Reverse the order and you are usually patching a problem that does not exist.