Download Open Source G.729 and G.723.1

codec_g729 and codec_g723.1 for Asterisk

Asterisk 1.0.x Asterisk 1.2.x Asterisk 1.4.x
Trunk, tested SVN 42264 07/09/2006
Asterisk 1.6 and later, FreeSWITCH
Arkadi's web site

You can browse the source code repository on Github

Credits

  • Intel originally offered a sample G.729 and G.723.1 implementation for Linux.
  • Daniel Pocock converted Intel's code into an Asterisk module.
  • Arkadi Shishlov and others supplied compiler optimizations, and bug fixes.

Introduction

This code let's Asterisk use the G.729 and G.723.1 protocols for voice compression when communicating with other devices. The code produces a Asterisk modules, codec_g729.so and codec_g723.so, that you put in your Asterisk modules directory.

The code is provided as a patch which will convert Intel's sample application into an Asterisk codec module.

This code only runs on modern Intel processors that are supported by Intel IPP libraries. See http://www.intel.com/software/products/ipp for details and license.

Why G.729 or G.723.1?

People often ask the following questions:

  • What is a codec?
  • Which codec should I use?
  • Which codecs does my phone support?
  • Which codecs use the least bandwidth?
  • Apart from bandwidth, what other issues should I consider when deciding on a codec?
  • Why should I use the G.729 codec or G.723.1

In VoIP networks, codecs are used to compress regular audio (16 bit signed linear audio, usually sampled at 8000Hz). Codecs are usually `lossy'. This means that the output data does not have to be perfectly identical to the source data , it just has to sound the same when converted to sound.

If your VoIP network is on an office LAN and the signal doesn't ever traverse a WAN connection (internet, VPN, DSL, etc), then compression isn't critical. If your VoIP signals may need to traverse a WAN, then you need to compress the signal as much as possible. This allows you to fit more simultaneous phone calls into a single WAN connection. Compression also creates smaller packets. Smaller packets means less audible delay and lower risk of packet loss.

G.729 is often preferred as a codec for WAN applications because of the following:

  • Many devices offer only 1 or 2 low bit rate codecs, usually G.729 and one other or just G.729. If you have bought phones that only support G.729, then you have little choice.
  • Some gateway providers will only allow you to talk to their gateway with G.729.
  • A good G.729 implementation uses less bandwidth and less CPU power than other low bit rate codecs such as iLBC. G.729 uses 8kbps, iLBC uses 13kbps.
  • Some people have observed their CPU performing up to 50% better when doing G.729 compression compared to iLBC.
  • Few phones implement iLBC (one such phone is Budgetone 101 and 102). Many others - Cisco 7940, Snom, Swissvoice - only offer G.729
  • Most phones offer G.711 (ulaw/alaw) as well - that is actually 64kbps, eight times the bandwidth required by G.729. It is only for use on LANs.

G.723.1 is used for similar reasons to those just listed, but gives the benefit of using even less bandwidth but with a more noticable degradation of sound quality.

Why NOT G.729?

There are some reasons you might not want or need to use G.729.

  • You don't want to pay the license fees or use the codec without the permission of the patent holder.
  • You don't want to use extra CPU cycles to perform compression, possibly because CPU power is more expensive than extra bandwidth where you live.
  • Your VoIP network is all running on ethernet.

See also, mirrors

Notes about install Intel IPP libraries
Arkadi's web site - binaries, mirror

Legal Stuff - Important, please read

To use G.729 or G.723.1 you may need to pay a royalty fee. Please see http://www.sipro.com for details. Please note that this code is available for you to download for education purposes only and if a patent exists in your country for G.729 or G.723.1 then you should contact the owner of that patent and request their permission before executing the code.

To distribute Intel's IPP libraries with a commercial product, you may need to pay a once-off license fee to Intel (currently $US180).

My patches to Intel's code are distributed free under the GPL. Most of the code is just Intel's sample code re-arranged a little bit to work the way Asterisk expects. Therefore, this work would not have been possible without Intel doing 95% of the work.