Asterisk G.729 Licensing
Business SIP Providers
|Provider||Plan Details||Monthly Rate *||PHP code|
8x8 IP Trunking
Business PBX Solutions
3CX Software PBX for Windows
Become an ITSP Now!
4PSA's VoipNow Cloud Communications Platform
How to use G.729 codec in Asterisk and license info
Many people use Asterisk because they want an open source solution. They are frustrated when they find that the G.729 module from Digium (the Asterisk creator) is not open source.
In fact, it is technically possible to use the open source G.729 and G.723.1 modules with Asterisk, while only buying the licenses from Digium or another vendor. This may violate the terms of commercial support contracts from Digium or other vendors, but for many people, the benefits of having a 100% free, open source software solution far outweigh the benefits of a support contract.
Many people also take this approach (using the open source modules with a paid license) to reduce the hassle and risk of administering the license locking. The closed source module from Digium is locked to a node (MAC address and other node attributes) and this can cause a lot of extra work if a machine fails and has to be replaced quickly. Not only does the support engineer have to resolve the hardware issue, but they may only find out later that G.729 is not working on the new machine, and they have to go through Digium support and argue for a license to use on the replacement machine/network card. This node locking approach can also be a real nightmare for high-availability systems with failover, for example, because the licenses can't automatically migrate on a failover event. The open source module, naturally, doesn't have any such risks.
The license issue
Using G.729 with Asterisk or other PBX requires a license per channel unless it is used in a way that does not convert the G.729 encoded data to another format; for example : Asterisk G.729 pass-thru mode.
A GPLv2 compliant license can be purchased from a company that re-sells G.729 licenses such as:
Digium LicensesWhen upgrading the number of licenses, Digium will have to merge the old licences with the new & provide a new license file.
Reboot the server to be sure that the license is seen correctly.
In a recent email I received from Digium technical support I was told:
"A hostid, is based on the sum of ALL the hardware in the machine, more specifically you are purchasing a license to use G729 on a single hardware set. You are allowed to install on a testing server as well, or if you need save the second hostid incase of needed hardware changes."
While they did allow me one additional change, be aware that if you are using them in a server where ANY hardware might change these aren't much of a valid option. After the one additional change they refused a second, even though in the latter case NO hardware changed.
Study or experiment with G.729 for freeUnder patent law, it is a legitimate use to study or experiment with a patented technology without paying for a patent license. You only have to pay royalty fees if you sell a product based on the technology or use the technology in products internally (this includes using the codec in a commercial setting, even if you aren't selling your platform, but only a service).
Opensource implementationAn opensource implementation of G.729 codec can be found at http://www.opentelecoms.org/codecs-open-source-g729-g723.1-asterisk. It is a wrapper around Intel Integrated Performance Primitives.
WarningPlease see Marks response on the user list (dated 25 Sep 2004) regarding use of non GPL-compliant G.729 codec from other sources. In short, he argues this violates the GPL license and jeopardizes the asterisk project. Looking more deeply, this seems to be a knee-jerk reaction from Digium, for the reasons uncovered by independent investigation of the license issues and the GPL in particular:
There is some disagreement about whether this truly does violate the GPL. The FSF, in particular, has rendered the legal opinion that it does not violate the GPL even if the modules are not GPL compatible. The GPL violation would occur only if GPL and non-GPL compliant code is distributed together or if the module links to GPL code (use ldd to verify what it links to) or is derived from GPL code (see copyright.gov for US copyright law on derivative works; look to your own countries' laws potentially in addition to the US laws since Digium is in the US). There is a page on this wiki that talks about asterisk GPL compliance and another that talks about how to make non GPL modules for asterisk legally.
GPL Myth Note: the GPL is a distribution license, not a use license. If you downloaded Asterisk from someone else and are using it, the person you downloaded Asterisk from must comply with the GPL. If you combine a static G.729 binary (non-GPL compatible licensed) with GPL software, YOU DO NOT VIOLATE THE GPL UNTIL YOU DISTRIBUTE THE COMBINATION. You ARE, however, allowed to use it yourself. Acceptance of the GPL is NOT required to download and use Asterisk, either by itself or in combination with the above G.729 implementation. Therefore, if you're not planning on giving copies of Asterisk away to others, the above GPL violation statement doesn't apply to you. For more information, please see the GPL FAQ.
Old Voiceage codec info:This license is keyed to inodes on an IDE disk (hard disk or CD-ROM in drive), which can be reused up to 3 times (e.g. if HDD dies) before having to contact Digium.
Older versions needed IDE disk to be one of hda, hdb, hdc, hdd and wouldn't work on SCSI-only systems. This is no longer true for new versions.
Need to run Asterisk with a console (this can be done in the background, by using safe_asterisk or screen).
How to count the number of licences required?A license is required only when the codec functionality is *actually* in use
i.e. when asterisk needs to transcode g729 into anything else, or the other way around
During a transcoded g729 call both directions (encoding and decoding) count as 1 license (but there could also be bugs crawling around in VA code regarding this matter)
You need 2 licenses to use 2 Cisco 7960s at the same time, assuming they are not calling each other at that moment. Accessing Voicemail counts as any other regular call
A license is required for any other "internal" asterisk function (C7960 to IVR, C7960 to MOH, Voicemail, etc), unless you could record all your IVR prompts in g729, in which case you would not need a VA license to play them to a g729 phone.
If you record Voicemails in g729 (which is possible with * by using format_g729.c) and all your phones used g729, you would not need a license, however you would need a license to access the Voicemail from PSTN!
If your g729 C7960 calls someone, and the called party places the callee on hold with MOH, a total of *2* licenses will be necessary — 1 for the call and 1 for MOH;
To confirm your purchased G.729 license key works:Run the Asterisk console and check:
- asterisk -r
- CLI> show g729
If this gave an error message, then either you have not run the Digium-supplied register utility, something about your system hardware changed (particularly Ethernet adapters), or there was a problem preventing the g729 codec from loading.
If you run Asterisk as an user other than root (highly recommended!), you may also need to ensure the user you run it under has access to the license information.
This assumes you run Asterisk with the asterisk user and asterisk group:
- chown -R asterisk:asterisk /var/lib/asterisk/licenses
If codec installation and license key works, you should see something like this — e.g. for three purchased licenses:
# asterisk -r
- CLI> show g729
For newer versions
- CLI> g729 show licenses
File: G729-6Q4423335234535.lic — Key: G729-62345454324545EF — Host-ID: 4a:b7:dd:ee:ff:ff:11:44:34:44:5e:64:3c:5a:86:27:a8:09:50:9f — Channels: 2 (Expires: 2032-05-28) (OK)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+