Which Audio Codecs Work with the Web Phone?
Table of Contents
What is a Codec? How the Web Phone Handles Audio Default Codecs What About Opus? Codec Quick Reference Practical TipsWhat is a Codec?
Before diving into the details, it helps to understand what a codec actually does. Think of a codec like a language translator for your voice. When you speak into your computer's microphone, the codec converts your voice into digital data that can travel across the internet. On the other end, it converts that data back into sound. Different codecs do this job in different ways, with trade-offs between audio quality, bandwidth usage, and compatibility.
How the Web Phone Handles Audio
The Web Phone is a browser-based softphone built on the WebRTC (Web Real-Time Communications) standard. Because it runs in your web browser (Chrome, Edge, Firefox, etc.), the codecs available to it are determined by the browser's support, combined with the Hosted PBX platform's configuration.
When you place or receive a call, the Web Phone and the other end of the call go through a quick behind-the-scenes negotiation. They compare their supported codecs and agree on one to use for that call. This happens automatically and takes only a fraction of a second.
Default Codecs
Out of the box, the Web Phone sends the following codecs in its SDP (Session Description Protocol) offer:
PCMU (G.711 u-law) - Payload Type 0. This is the most widely used voice codec in North American telephony. It samples audio at 8 kHz and runs at a fixed 64 kbps. Think of PCMU as the universal common language of Hosted Voice. Nearly every phone, gateway, and carrier supports it. The audio quality is clear and reliable for voice calls, though it is limited to the frequency range of a standard telephone call.
G.722 - Payload Type 9 G.722 is considered a "wideband" or "HD Voice" codec. It captures a broader range of audio frequencies than G.711, resulting in voices that sound richer and more natural. It still uses 64 kbps of bandwidth, so it does not cost more in terms of network resources, but it delivers noticeably better sound quality. G.722 is an excellent choice when both ends of the call support it.
Telephone Event (DTMF) - Payload Types 101 and 126. These are not traditional voice codecs. Instead, they handle DTMF tones, the sounds produced when you press number keys during a call. This is essential for navigating automated phone menus (IVRs), entering voicemail PINs, and similar interactions. Without these payload types, pressing keys during a call would not work.
What About Opus?
If you are familiar with WebRTC, you might wonder why Opus is not listed as a default. Opus is a modern, open-source codec that the WebRTC standard actually requires all browsers to support. It is incredibly versatile, handling everything from low-bandwidth voice (as low as 6 kbps) to high-fidelity stereo audio (up to 510 kbps), and it can adapt its quality in real time based on network conditions.
While the browser itself fully supports Opus, our Hosted PBX platform does not include it in the Web Phone's default codec list. This is because the platform needs to maintain compatibility with the wider telephony network, including desk phones, SIP trunks, and PSTN gateways that may not support Opus. Using PCMU and G.722 as defaults minimizes the need for transcoding (converting audio from one codec to another mid-call), which can introduce slight delays and reduce audio quality.
Codec Quick Reference
| Codec | Payload Type | Bandwidth | Sample Rate | Best For |
|---|---|---|---|---|
| PCMU (G.711 u-law) | 0 | 64 kbps | 8 kHz | Maximum compatibility, standard voice |
| PCMA (G.711 A-law) | 8 | 64 kbps | 8 kHz | International systems, standard voice |
| G.722 | 9 | 64 kbps | 16 kHz | HD Voice, improved clarity |
| Opus | Dynamic (111) | 6 to 510 kbps | Up to 48 kHz | Adaptive quality, variable bandwidth |
| Telephone Event | 101, 126 | N/A | N/A | DTMF key presses during calls |
Practical Tips
For the best call quality, ensure G.722 is included and listed early in the codec preference order. When both the Web Phone and the other party support G.722, the call will automatically use HD Voice without any extra bandwidth.
If users report audio issues, check whether the codec configuration has been modified. Returning to the default values (0, 9, 126, 101) is a good first troubleshooting step.
If calls to external numbers sound poor, the issue may not be the Web Phone codec. Audio passes through multiple systems on its way to the other party. The codec used between the Hosted PBX and the carrier (the SIP trunk) may differ from the one the Web Phone uses locally. Each hop where the codec changes introduces a small risk of quality loss.
Network bandwidth matters more than codec choice in most cases. Even the most efficient codec will sound bad on a congested or unstable network. Ensure that the computer running the Web Phone has a stable internet connection, ideally wired rather than wireless, and that your network provides adequate Quality of Service (QoS) for