Simple definition
An audio codec is an algorithm that encodes and decodes sound. In VoIP calls, it converts speech to digital data for transport and reconstructs the audio at the receiving end. Codec choice can affect call quality, bandwidth use and endpoint compatibility.
Technical definition
When a VoIP call is established, endpoints advertise supported codecs, commonly through SDP parameters exchanged in SIP signaling. The selected codec produces audio carried over RTP or SRTP packets. Transcoding converts audio between codecs; it can consume resources in a PBX or gateway and may affect latency or quality.
- Speech Microphone
- Codec G.711 / G.722 / Opus
- RTP / SRTP IP transport
- Decoding Compatible codec
- Playback Speaker
Bitrate and audio quality depend on the selected codec and network conditions; codecs are not a replacement for RTP transport.
Common VoIP audio codecs
- G.711 (PCMA/PCMU): typically 64 kbit/s of audio payload, excluding network packet overhead; widely used for conventional telephony.
- G.722: a wideband codec that can improve speech intelligibility when supported end to end.
- Opus: a modern adaptive-bitrate codec used in real-time communications.
- Other codecs, including G.729, may be supported depending on the carrier, endpoint and applicable licensing.
What is an audio codec used for?
A codec makes digital speech transmission possible while balancing perceived quality, bandwidth and processing requirements. It does not replace SIP call signaling or RTP media transport: these are separate parts of VoIP communications.
Practical example
A user calls from the 3CX desktop app through a SIP trunk. If both ends support the same codec, audio may pass without conversion. If they do not, a compatible intermediary may need to transcode the audio.
Common issues
- Connected call without sound: first investigate RTP routing and firewalls, then inspect negotiated codecs.
- Choppy voice: measure packet loss and jitter before changing codec preferences.
- Codec rejected: compare advertised and selected codecs in SDP and the provider's supported profile.
- Excessive transcoding: review PBX processing load and avoid unnecessary codec conversions.
- Insufficient link capacity: account for IP/UDP/RTP headers and concurrent calls, not just nominal codec bitrates.
How to troubleshoot codec negotiation
- Identify both endpoints, the SIP trunk and a reproducible affected call.
- Inspect codecs offered and selected through SIP/SDP negotiation.
- Confirm an end-to-end compatible codec or a correctly configured transcoding path.
- Check RTP packet delivery and network quality independently from codec selection.
- Review codec priorities separately for the PBX, endpoints and SIP provider before making changes.