Navigate to...
Goodbye G729 Hello HD Voice

Tech Blog

Goodbye G.729. Hello HD Voice :)

by in Telephony
G.729 on Skype - source: the internet

In the early days, when VoIP was still in its infancy, businesses large and small were reluctant to transition off of their tried and true TDM Networks to bleeding edge IP Telephony. If it ain't broke don't fix it was the mantra heard at industry events, along with murmurs about unpredictable call quality and other horror stories, compared to TDM's unmatched clarity and reliability. But the advantages of IP Telephony were far to great to resist. It the end, it was codecs like G.729, (and its siblings - G.729a/b), that rode in and helped aid in the rapid adoption of VoIP over next decade or so. Well, thank you so much G.729! Now slide over and let an HD codec take the wheel.

The TDM Advantage

The Internet was very different during that time. Your connection choices were limited to DSL with speeds averaging a measly 512Kbps, or a full T1 (DS1) circuit netting you a potent 1.5Mbps (full duplex) connection at a substantially higher cost. Variations were also available such as fractional T1s, to higher speed T2, T3 and OC3 (optical) connections with speeds hovering around a breakneck 50Mbps. The latter options were generally reserved for extremely large corporations due to their luxuriously high costs.

Traditionally, voice often traversed a completely isolated network; initially through large blocks of analog telephone (POTS) lines, later migrating to TDM based T1 or PRI digital circuits. These digital lines later became the de facto medium for general purpose business telephony needs; offering guaranteed call quality and assured bandwidth availability over a dedicated connection to the Central Office.

You could transmit a max of 24 simultaneous calls over a single T1 circuit, (23 calls on a PRI with a D-Channel for Caller ID), while economically utilizing only 2 physical wire pairs; the equivalent of just two telephone lines. As you can imagine, this was extremely efficient. With a TDM circuit, you knew exactly how much bandwidth or call capacity you had at your disposal, 24/7/365. Skipping an entire lesson on digital circuits, this is accomplished by compressing and digitizing the analog voice signal using the µ-law (mu-law) algorithm, which nets us about 64Kbps of data (plus overhead) for a single voice call.

The µ-law, (and a-law in European regions), algorithm helped the set the standard for modern day call quality over the PSTN by offering a great balance of compression vs. audio quality. The PSTN standard is what many VoIP codecs implemented today are continuously compared against.

TDM Overview - source:

A Hybrid Network

One of the benefits of VoIP is the ability to accommodate voice and data traffic over a single network connection. Businesses saw this as a huge opportunity to save some dough by eliminating those expensive voice only T1 / PRI circuits.

Naturally, the first instinct when migrating to VoIP was to mimic the quality of the PSTN. Skipping another lesson on the advent of VoIP codecs; the G.711 (or PCMU) codec was developed to produce nearly identical call quality, at similar bandwidth requirements, to that of a single voice call over a T1 circuit on the PSTN; roughly ~64Kbps (plus overhead), sweet!

It was bittersweet however, as the circuit was still a mere 1.5Mbps, which needed to be shared between voice and data traffic. If left unchecked, the potential to saturate the links was just an oversight away. Technologies were developed left and right to help manage traffic intelligently, shifting available bandwidth between voice and data traffic as demand dictated. This feat was not without obvious drawbacks however, such as prioritizing traffic during busy hour periods — (i.e. how long should either traffic type dominate the link?) — and often led to companies throwing huge amounts of money at the problem by purchasing additional circuits et al… wait, aren’t we trying to save money here?

Low Bandwidth Dominance

Enter the G.729 codec. G.729 was developed to optimize voice (and voice only) over low bandwidth links. By filtering out noise and other non vocal frequencies from the signal, then compressing and digitizing the result, we’re left with a mere ~8Kbps (plus overhead), for a single voice call, at a moderately acceptable quality score.

Divide that number into the total available bandwidth of a T1 circuit, while accounting for overhead, payload etc., nets us with a whopping ~96 simultaneous calls over that single T1 circuit! That's 4 times as much of what we could obtain using the standard G.711 codec. We now have much more headroom to play with along side that volatile Internet traffic, at a much greater call capacity over a single Internet connection.

It’s fair to say the G.729 codec helped accelerate the adoption of VoIP Telephony, but not without a noticeable sacrifice in call quality. The human voice occupies a pretty narrow frequency band with a range of 300Hz to 3.4kHz; these are the focal bands where G.729 excels. Feed any other type of audio however, i.e music on hold, through a G.729 filter and it will mutilate the outer frequencies, resulting in a tiny, somewhat garbled sounding representation of the original audio. Granted, the traditional PSTN G.711 codec was never optimized for pristine quality music either but has much more forgiving filtering curves in this regard.

G.729 Bandwidth Usage - Source:

A Crystal Clear Future

Fast-forward 15 years and take a look round you. Businesses have been swapping out those paltry 1.5Mbps “high speed” circuits in preference to modern 25Mbps to 100Mbps “Broadband” Cable or FiOS (Fiber) connection, at a fraction of the cost. Enterprise companies, (and those lucky enough to be located in a Google Fiber neighborhood, —looking at you Kansas!) can enjoy speeds of 500Mbps to 1Gbps and beyond. Corporate connections at those speeds however, are exorbitantly higher priced albeit with the added benefit of guaranteed symmetrical bandwidth over dedicated connections — this outlook is changing for lower end connections as we speak however.

Hopefully, you can see where we have been heading with this article. We’ve been tolerating the pitfalls of G.729 such as per channel licensing, (yes, G.729 is a proprietary codec), higher computational (CPU) costs, and well let’s face it; terrible audio quality with regards to enhanced features such as music or advertisements on hold. Advancements in codec technology is starting to pick up steam, such as the Adaptive Multi-Rate HD codec (G.722.2 AMR), to other versatile variable bit rate codecs such as recently released OPUS spec.

AMR codecs adapt to the current Network conditions and adjust the quality characteristics on the fly. Similarly, the OPUS codec intelligently alters the bit rate, yet losslessly compresses the audio using a wide frequency band, preserving much of the original audio quality. Although adoption of these modern codecs is moving at a snails pace, it’s exciting to know we are on a path to a crystal clear future with end to end HD calls between disparate Networks. For now, let's say goodbye to G.729 and hello to HD voice, by either upgrading your existing IP Telephony or migrating to Hosted VoIP.

HD Voice Comparision - source:

Our Codec Selection

For the curious, we take a top down approach for our own codec selection process on our Cloud PBX platform, starting with a high-definition voice codec and downgrading to standard definition PSTN (and lower) where appropriate. If you’re calling another extension on your phone system, checking your voicemail, or dialing into your conference bridge, you’ll remain on the HD G.722 codec. This wideband HD codec offers better than PSTN call quality at marginally the same bandwidth (~64Kbps, plus additional overhead). The result is a crystal clear representation of the original audio that some say is “as if the person is standing right next to me.”

HD Voice on our Cloud PBX
  • Extension to extension phone (and video) calls
  • System destinations (voicemail, conference bridge, IVR etc...)
  • External calls to on-network DID numbers

If you’re dialing out externally, we’ll switch to the traditional quality G.711 (PCMU) codec. Unfortunately, we are still a long ways off from an all HD PSTN network (but anxiously waiting), so this saves on unnecessary transcoding between codecs on our platform. If your bandwidth capacity is somewhat limited but you’d like better than G.729 quality, we can hard code a more bandwidth friendly codec such as the lesser-known G.726-32 for all your VoIP calls. At just 32Kbps (plus overhead), it’s half that of G.711’s bandwidth consumption yet offers nearly identical call quality for voice, music and advertisements on hold. The average human will not be able to differentiate between G.726-32 and a call using the standard G.711 PCMU codec.

VoIP related issues these days have less to do with just bandwidth capacity alone, and are more likely the result network peering issues or a faulty network link, somewhere upstream of your Network.

If you’re on a really saturated pipe or a stuck on a low bandwidth connection (we feel your pain), we’ll switch you to a lower bandwidth codec such as iLBC (~8Kbps) and or of course the trusty old G.729a. iLBC has a much more noticeable quality reduction compared to all other mentioned codecs, but still tolerable if your network conditions warrant its use. We’d actually recommend fixing (or upgrading) the network issue causing the bottleneck before switching to these low bandwidth codecs however. In actuality, most VoIP related issues these days have less to do with your bandwidth capacity alone, and are more likely the result bad network peering or a faulty network link, somewhere upstream of your Network. These conditions can result in high packet loss, jitter (PDV) or latency, all of which can directly affect VoIP quality. We are basically at the mercy of our ISPs to maintain a reliable Internet connection — more on this topic in a future blog post.

Final Thoughts

The Internet has improved tenfold over past 15 years. Broadband speeds today are literally crushing older “high-speed connections” with even faster speeds on the horizon. Now is the perfect time (if you haven’t already), to switch to VoIP Telephony and reap the benefits. And if you’re already running on a VoIP network and your calls are squeezing out over G.729, do yourself and your callers a favor and give a fancy, higher bit rate, or better yet an HD codec a try; that's if your bandwidth and Internet connection permits.

Food for thought: HD voice is not just limited to IP Telephony. Companies such as Verizon, Sprint, AT&T and T-Mobile have been rapidly upgrading their 3G / CDMA / GSM cell sites to accommodate HD calling with enhanced VoLTE (Voice over LTE), in urban and rural markets. The broadband mobile 4G adaption has been making some serious headway and allowing for PSTN and HD like call quality through your smartphone’s mobile network; for both VoIP and traditional cellular calls.

FYI: The traditional GSM cellular codec digitizes voice to roughly ~13Kbps, which should give you an idea of the quality levels we’ve been putting up with on a cell phone compared to the PSTN. G.729 (and other low bandwidth codecs) have proven their worth and are still valuable under certain uncontrollable network conditions; but it’s about time for HD Voice to shine.