Voice teams often disagree about which codec to use on their SIP trunks. Some prefer to use G.711 everywhere, because it’s the format the public phone network uses and it rarely causes problems. Others prefer to compress audio wherever they can, because bandwidth costs money and newer codecs can sound better.
A codec is the method used to turn speech into data so it can travel over a network, and then back into sound at the other end. For SIP trunks, the choice usually comes down to three options. G.711 is uncompressed and uses about 87 kbps in each direction per call over a typical Ethernet connection. G.729 is compressed and uses about 31 kbps. Opus has a variable bitrate and can carry higher-quality wideband audio. Each one works best in a different part of the network, so the right approach is to choose the best codec for each segment and convert between codecs as few times as possible.
Both sides of the debate have a point. This article sets out the case for each, compares the three codecs on the factors that matter, and ends with a recommendation for each part of the network.
The case for using G.711 everywhere
G.711 is the codec used across the public phone network, and almost every carrier and session border controller (SBC) supports it. As a result, calls agree on G.711 without surprises.
Because G.711 doesn’t compress the audio, it carries more than speech cleanly. That includes the tones you hear when someone presses a key on a phone keypad, fax signals in some cases, and the quiet background sounds that make a call feel natural. It also adds almost no processing delay. Most importantly, when both your trunk and the carrier’s network use G.711, nothing needs to be converted, which removes a whole category of audio quality problems.
The drawback is bandwidth. When audio is sent in 20-millisecond packets, a G.711 call uses about 87 kbps in each direction once the network headers are included. Fifty simultaneous calls therefore need around 4.4 Mbps in each direction. On a modern data center connection that’s a small amount, but on a busy connection at a branch office it can cause problems.
The case for compression
G.729 carries a call using about 31 kbps in each direction with the same packet size, which is roughly a third of what G.711 needs. On limited connections, such as satellite links or branch offices with slow internet, that difference determines how many calls the connection can carry.
G.729’s main drawback used to be licensing cost, but that’s largely no longer an issue because the patents covering it have expired. Today, most SBCs and phone systems support it.
Opus offers a different advantage. It’s a modern, flexible codec that adjusts its bitrate to network conditions and can carry wideband audio, which sounds noticeably clearer than standard telephone audio. It’s also the standard codec in WebRTC, the technology behind most calling in web browsers and apps. For platforms where calls stay entirely on IP networks, Opus can be both more efficient and better-sounding than G.711.
Comparing the three codecs
The table below scores each codec from 1 to 3 on the factors that matter most for a SIP trunk, where a higher score is better.
| Factor | G.711 | G.729 | Opus |
|---|---|---|---|
| Bandwidth efficiency | 1 | 3 | 3 |
| Audio quality on calls to and from the phone network | 2 | 1 | 2 |
| Audio quality on calls that stay on IP networks | 2 | 1 | 3 |
| Support from carriers and SBCs | 3 | 2 | 1 |
| Handling of fax and keypad tones | 2 | 1 | 1 |
| Processing load and delay | 3 | 2 | 2 |
| Resilience to lost packets | 1 | 2 | 3 |
A few of these scores need explaining.
Opus on calls to and from the phone network (2). Although Opus can carry wideband audio, a call to or from an ordinary phone is limited by the phone network, which only carries standard telephone audio. Once a call reaches the phone network, the extra quality is lost, whichever codec the IP side used.
Opus support from carriers (1). Opus is widely supported in browsers and modern platforms, but far fewer carrier SIP trunks offer it than offer G.711. On the connection to the carrier, using Opus therefore often means converting the audio.
Fax and keypad tones. Compressed codecs distort fax signals and tones sent within the audio. For this reason, keypad tones should be sent as separate events using a standard called RFC 4733, and fax should use T.38, whichever voice codec you choose.
The hidden cost of converting audio
Whenever a call switches from one codec to another, a device has to decode the audio and encode it again. This process, called transcoding, uses processing capacity, adds a few milliseconds of delay and slightly reduces audio quality. The loss is greater when two compressed codecs are used one after the other.
The worst case is a call that is converted more than once, for example compressed with one codec, converted to a second and then converted again. Each step reduces quality, so a call that sounds fine in testing can sound noticeably worse in everyday use because of a conversion nobody knew about.
Transcoding also puts a concentrated load on specific devices. SBCs can only convert a limited number of calls at once, and if they run out of capacity at busy times, calls fail or sound poor in ways that are easily mistaken for carrier problems. If your platform connects Microsoft Teams to a carrier, the SBC is almost certainly converting audio, and our guide to what breaks in Teams Direct Routing explains why that capacity needs planning.
Our recommendation: choose by network segment
Each side of the debate is right about a different part of the network. The best approach is therefore to choose a codec for each segment and keep the number of conversions between segments as low as possible.
| Network segment | First choice | Reason |
|---|---|---|
| Your SBC to the carrier | G.711 | Matches the phone network and avoids conversion on the carrier side |
| Branch office with a slow connection | G.729 | Uses about a third of the bandwidth per call |
| Users in browsers or apps (WebRTC) | Opus | Built in, adjusts to network conditions and supports wideband audio |
| Internal calls between IP devices | Opus or G.722 | Wideband quality where the phone network isn’t involved |
| Fax | T.38 | Compressed voice codecs distort fax |
| Keypad tones | RFC 4733 events | Works reliably with any voice codec |
Alongside the table, follow three rules. First, offer G.711 as the first choice on the carrier trunk unless bandwidth makes that impossible. Second, convert audio only once, at a single point that you’ve sized for peak traffic. Third, test with the kinds of calls you actually handle, including hold music, IVR prompts, menus that rely on keypad tones and calls to mobile networks.
How packet size affects bandwidth
The bandwidth figures in this article assume that audio is sent in 20-millisecond packets, which is the most common default. This setting, called packetization time or ptime, controls how much audio goes into each packet, and it affects both bandwidth and delay.
Longer packets, such as 30 or 40 milliseconds, carry more audio for each set of network headers. As a result, overhead falls and each call uses less bandwidth. The trade-off is slightly more delay and a bigger gap in the audio when a packet is lost. Shorter packets have the opposite effect. For G.729, where headers make up a large share of each packet, moving from 20 to 30 milliseconds makes a noticeable difference on slow connections.
Both ends of the call must agree on the packet size, and some carriers only accept certain values. For that reason, keep the setting at 20 milliseconds unless bandwidth forces a change. If you do change it, test calls to mobile and international numbers, where extra delay is noticed first.
Testing your codec choices before rollout
Codec choices that look sensible on paper can behave differently in real use, so test them before rolling them out widely. Make test calls across the routes that matter to you, including calls from office and remote users, calls to mobiles and landlines, domestic and international calls, and calls that pass through your IVR and hold music.
During testing, listen for clipped speech, robotic-sounding audio when packets are lost and muffled hold music, which compressed codecs handle poorly. Also check that keypad menus and any fax workflows still work. Finally, record which codec was actually agreed on each part of the call, because a test that sounds fine may have quietly switched to a codec you didn’t plan to use.
It’s also worth remembering that codec selection is based on a list of preferences rather than a fixed choice. If the other side doesn’t support your first preference, the call automatically uses the next one on the list. Checking the agreed codec in your call records from time to time ensures that a configuration change doesn’t move traffic to an unplanned codec without anyone noticing.
Voice AI and short automated calls
Speech recognition generally works better with wideband audio, which leads some voice AI teams to use Opus from end to end. That helps when callers reach you through an app or a browser. For calls from ordinary phones, however, the audio arriving from the phone network is standard telephone quality, so using G.711 on the trunk preserves all the quality that’s available. In practice, the bigger improvements usually come from avoiding extra conversions and lost packets rather than from the choice of codec. Our SIP trunking for AI agents hub covers this setup in more detail.
For short automated calls, such as verification codes read out to users, clear speech matters more than saving bandwidth. Numbers read by a text-to-speech system are easy to mishear on a heavily compressed or unreliable connection, which is why our post on voice OTP fallback recommends G.711 for those calls.
Planning bandwidth once you’ve chosen
After you’ve chosen a codec for each segment, planning bandwidth is a simple calculation. Multiply the bandwidth per call for that codec by your peak number of simultaneous calls, then add a margin of around 20% for signaling and short bursts of traffic. Do this for each connection rather than for each site, because a branch office’s internet link and the data center’s carrier connection carry different traffic.
If you’re replacing older phone lines, include this calculation in the network stage of the project; our PRI to SIP migration runbook shows where it fits. If audio stops working in one direction after you change codecs, the cause is usually network address translation or the firewall rather than the codec itself, and our guide to fixing one-way audio explains what to check.
Checking codec support with your carrier
Before you finalize your design, ask your carrier which codecs it supports on its trunks and in what order of preference, whether it converts audio on its side, and how it handles fax and keypad tones. The answers will tell you where conversion needs to happen in your setup.
IDT Express provides SIP trunking from 40+ locations, so platforms can connect each site to a nearby point of presence and keep the carrier side on a single, predictable codec plan. When you plan your design, confirm with the team which codecs are available on your trunks. Our SIP trunking page gives an overview of the service.
Frequently asked questions
Which codec is best for SIP trunks?
G.711 is usually best between your SBC and the carrier, because it matches the public phone network and avoids converting audio. Use G.729 where bandwidth is limited, and Opus for calls in browsers, apps or entirely on IP networks.
How much bandwidth does a SIP call use?
When audio is sent in standard 20-millisecond packets over Ethernet, a G.711 call uses about 87 kbps in each direction and a G.729 call about 31 kbps. Opus varies depending on the bitrate it’s set to use.
Does G.729 still need a license?
The patents covering G.729 have expired, so licensing is no longer the obstacle it once was. Most SBCs and phone systems support it without a separate codec license.
Can you send fax over a SIP trunk?
Yes, but use T.38 rather than sending fax through a voice codec. Compressed voice codecs distort fax signals, and even G.711 can be unreliable for fax over IP networks.
What is transcoding and why does it matter?
Transcoding means converting a call from one codec to another. It uses processing capacity, adds a little delay and reduces audio quality, especially when it happens more than once on the same call.
Explore SIP trunking
If you’re planning codecs for a new SIP setup, explore IDT Express SIP trunking and check codec support for your trunks.


