Is G729 Codec Free? Or Under License???

Home » Asterisk Users » Is G729 Codec Free? Or Under License???
Asterisk Users 27 Comments

hello all, i have problem in using g729 codec. my asterisk version is 1.8.22. when i run “core show codecs” in asterisk, there is a g729 codec in the list so i assume that i can use it for my channels. but connection can not be set when i use it for my h323 channel.

i read somewhere that codec g729 is a commercial codec and i should buy its license in order to use it. is it true? if yes, why is it listed in codecs in asterisk??

thanks in advance, SAM

27 thoughts on - Is G729 Codec Free? Or Under License???

  • s m schrieb:


    Asterisk has a free codec for g729, but it can only pass through g729 channels. If you need to translate from/to g729, you need a license from Digium.

    On a side note, “free or under license” is nonsense. Free software also has a license; you always need a license to use software – some copyright holders just do not make you pay for it and do not limit your rights (a concept called public domain does not exist globally).

    – -nik

  • thanks Dominik, you’re right. i don’t pay attention enough about my subject.

    about g729, you mean if it get free g729 and all my systems (PBXs and routers) use g729 codec for setting a call, call is set without any problem?

  • Hi,

    Yes, if all systems use g729 directly, you are ready to go.

    – -nik

  • thank you Dominik you help me a lot.

    and the last question is how many license key should i buy? i read that license for g729 is per-channel but i don’t understand what channel exactly means here. this is my scenario :


    pbx181 and pbx183 has 10 endpoints connected to them. the call between these endpoints are established by pbx182. if i want to buy a license for pbx182, how many license key do i need? just one because i have just one connection on it? or two, because two trunks is defined on it? or as many as endpoints which are connected to each other via pbx182?

    please help me to clarify channel concept in my mind. thanks in advance SAM

  • AFAIK, you need one license for each channel that is transcoding from one given codec to g729 (or the other way around).

    So if at any given time on an asterisk box you would have a maximum of 3
    simultaneous calls that are g729 at one end and ulaw at the other, you would need a license key for 3 transcoding channels.

    Anyone, please correct me if I am wrong on this.


  • Are these end points Hard IP Phones having g729 codec?

    If yes then you dont need any license. Just download passthrough g729


  • thanks guys for your replies. no, these endpoints are soft phones which can have different codec. now, for my scenario, how many license key in needed?

  • In your scenario, all the calls are from endpoints on 181 to endpoints on
    183. If the endpoint devices are similar, it seems to me that there should be no need to transcode-you can use a codec common to the endpoints. 729
    would not be required.




    Yes, if all systems use g729 directly, you are ready to go.

    – -nik


  • When calling between two g729 client endpoints you do not need any licenses as long as no audio prompts or voicemail is evolved. Also as a sip trunk provider we offer g729 as a source and destination codec this allows you to make calls in and out using g729 (most carrier grade providers offer this option)

    You really only need to buy the number of g729 licenses that you will need for callers that require simultaneous transcoding. This is when a callers stream in or out will need to be converted to another codec format. This occurs when callers are jumping from say g729 to g711 or g729 to g722, g729 to gsm. If you plan things right and make sure any audio prompts your system is using are recorded in g729 as well as g711 and g722 you will reduce the number of g729 license considerable.

    Process that use a lot of g729 transcodes. ConfBridge uses g722 so all g729 has to be converted to and from g722 so 10 g729 callers to a confbridge would likely require 10 codecs (**See confbridge trick below). If you have prompts that are not pre-encoded in g729 those would use a transcoder license while playing. Voicemail would require a license as g729 has to be transcoded to one of the storage formats.

    The real number is based on how you are using your system.

    ConfBridge Trick – Have seen this used for voicemail as well, Make sure you test when using this method.

    If you can live with using higher bandwidth to the asterisk switch when using confbridges (endpoints also have to support in call reinvites correctly) you can force endpoints to re-invite to g722 before dropping into the conference bridge. This has the upside of not needing to transcode on the server thus improving performance and reducing g729 license requirements. This comes at the cost of needing higher bandwidth between the client endpoints and the phone. Figure about double the bandwidth when using this method. It may or may not be worth it to you depending on your scenario.

    Please let us know if this information helps you.


    Bryant Zimmerman

    Sr. Systems Architect Grand Dial Communications , A ZK Tech Inc. Company
    616-299-5607 (mobile)
    616-855-1030 Ext. 2003 (office)


  • Hi guys.

    I would also add that in countries which do not recognize software patents (New Zealand for example) there is no need to get a license and the codecs can therefore be downloaded from
    and used freely.

    In countries where there is ambiguity about certain software patents,
    (such as Canada or Germany)…. well you take your chances. Countries that do recognize them (such as the US or Japan) you’d be smart to get a license.

    Also I do believe the US patent on g729 expires next year anyway, so again you might want to weigh that costs/risks factor too.

    cheers, darryl

  • I’ll explain.

    The g.729 compression algorithm is not protected by copyright, though specific instances may be. It is protected by a patent.

    An open source version is available here:

    What stops you from using this, or even your own implementation isn’t copyright, but patent protection. It is the right to use the patented technology that you are licensing, not the particular copyrighted coded that implements it.

    Here you will find the various G.729 patents which were all granted in

    I had thought these expired next year because I was thinking patents were only 18 years. Turns out they are now 20 years, so they really do not expire til some time in 2016. My bad.

    So in countries that honour software patents, you need to have a license until some time in 2016. In countries which do not, you are free to use these open source codes now.


  • The G.729 codec software at uses a codec implementation copyrighted by Intel. You need to obey their copyright conditions. If you use G.729A (which practically everyone does) I think there are one or two patent which run beyond 2016, at least in the US. What have the essential patents relevant to G.729 got to do with software patents?
    Regards, Steve

  • codec implementation copyrighted by Intel. You need to obey their copyright conditions.

    correct, and for a few hundred dollars you are free to use it as you see fit, without royalties. note that i also said that the patent license applies even on code that you write yourself.

    or two patent which run beyond 2016, at least in the US.

    perhaps. i do not claim to have fully researched either the patents or the protocol. is 729 compatible with 729a? out of curiosity though i will find out more about these other patents.



    umm… they are software patents.

    relate to

  • Really? Do you have expert legal opinion on that? I’ve never seen anyone competent dispute the patentability of applied signal processing. Such patents get issued all over the world. There are a couple of software patents related to G.729, but those are not part of the essential pool of patents, and those are probably US only. Regards, Steve

  • Thank you Steve, and I read a bit more on the web on this subject including your own well reasoned page at

    However, despite wide acceptance of the patentability of such codecs
    (unfortunately), whether they are in fact software patents or not appears to be a matter of opinion. The FSF and Fedora both refer to codec patents as being software patents.

    A quick google search of both terms will show that there are a great many people who see codec patents as software patents, so I don’t think I am alone there.

    Though I think I can see how you differentiate them, I’m not sure there are any simple rules on how you draw that line between them, and that is very problematic.

    Before the advent of powerful personal computers, codec patents would have few societal issues. I think now, the harm caused by these patents are greater than the benefit. Much like the harm caused by current copyright laws out weigh the current benefits.

    I was disappointed to read that New Zealand’s patent reforms did not go as far as to invalidate codec patents, but I do look forward to g.729
    entering the PD in 2016ish and joining MP3s which also recently became an unencumbered format in most countries.

  • Darryl Moore wrote:

    Law is ALWAYS open to interpretation, so that is not surprising. See if you can get any lawyer, and especially a patent attorney, to give you a definitive answer! You will not get one. Seldom will you ever get an “eggspurt legal opinion” Any good lawyer will tell you “maybe”, or if there is any doubt don’t do it!
    Law is not precisely measurable. No meter or O’scope to assist here. Any A**hole can sue anyone for the filing fee, and the results are up to the opinion of a judge or jury. The lawyers want it that way, so it isn’t ever going to be any different.

    John Novack

  • thank you everybody for your useful replies and so sorry to answer late.

    i understand what i need. first of all, i wanna to use pass through g729
    codec (which is free). so i go to to get g729
    codec. i have freebsd 8.2 and asterisk 1.8.22 but there is no compatible codec for Xeon Intel in the list. it means that i can’t use codec g729 on my system??? or can i use codec for another type of hardware for my system?
    anyone has any experience?

    thanks in advance SAM

  • HI, You don’t need a g729 installed in pass throw mode. if both ends have codec g729 you can just enable on both peers. and asterisk should pass the codec from 1 end to other. but make sure you are not doing transcoding of any type answering the call playing voice prompts etc.

  • thanks Asghar, but are you sure? my two endpoints -which are soft-phones-
    have g729 codec but my asterisk on middle system has not any module for g729 codec. i think i should get module g729 for my middle system in order to pass calls with g729 codec. isn’t it true?

  • Xeon is amd64 (except older ones, which are ia32). But I would always advise anyone just to get the Source Code — which is for *all* architectures — and build it themselves.

  • In article , s m wrote:

    No, it’s not. Asterisk can pass G.729 frames transparently from one endpoint to another without using a codec.

    However, that does limit the functionality of Asterisk a bit.

    Asterisk does need the G.729 codec any time it needs to understand the contents of a G.729 frame, in order to do any of these:

    1. Play a sound (unless you have installed the g729-format sounds).
    2. Save voicemail (unless you have configured voicemail ONLY to save g729 format).
    3. Detect in-band DTMF (you should be using RFC2833 instead of inband anyway).
    4. Meetme or Confbridge conferencing (needs to convert to linear in order to mix).
    5. Play music on hold (unless you have installed only g729-format music).
    6. Bridge a call to a device that cannot do G.729 format or a non-VoIP channel.

    There may be others I haven’t thought of.

    So I guess if you have only G.729-capable devices, a G.729-capable SIP trunk, install the G.729 sounds and music and configure the system correctly, the only thing you can’t do is conferencing.

    However, I don’t see any real need to use G.729 unless you are severely limited on network bandwidth. It seems to be a solution to a historical problem that has largely gone away nowadays. You will get better quality with G.711 at least.

    Cheers Tony

  • Hi, no you don’t need just allow g729 on both peers or allow all on both peers and enable only g729 on softphones. my asterisk in middle don’t have g729 and g723.1 on my asterisk but my both end point have these codecs i just allowed the codes and it works perfectly.

  • Darryl Moore> writes:


    The G729 essential patents were *granted* in 1996, but applied for prior to June 8 1995. That means their lifespan is either 20 years from their application date, or 17 years from their grant date, whichever is greater

    Either way, they expire in 2014.


  • Hi Jeff,

    Where did you get the cutoff date of June 8 1995, and how does 20 years from that date lead to the last of the patents expiring in 2014? Nobody uses G.729. They use G.729A. The G.729A spec is somewhat later than the original G.729, but I don’t know if there are any additional patents which specifically relate to Annex A. You could use G.729 instead, but it roughly doubles the compute needed.

    There are various things on the web saying the last of the patents on G.723.1, which was around in draft form long before G.729, expires in
    2014. However, there seem to be patents related to that codec which don’t really expire until some time in 2015. Its really hard to find solid information. The ITU patent database rarely identifies the actual patents being claimed, so its damned hard to look them up.

    Regards, Steve

  • If it allows me to avoid the trolls: I’ll pay that performance hit. In many caces there are CPU cycles to spare. But the licensing is a hard limit.


  • Well, you do get the benefit of higher quality for your extra compute. G.729 sounds distinctly better than G.729A on a lot of material. Regards, Steve