http://phonewire.com/wp-content/uploads/Xorcom-Logo.jpg

 

https://www.cluecon.com/media/img/sponsor/voip-info_logo_x170_v2.png

 

https://lh5.googleusercontent.com/-UUDyQ0CdJwY/UsXGpq9p6DI/AAAAAAAAP-A/vUu7Bs8gr3U/w480-h500-k/Asterisk-Logo.PNG

 

http://www.nielsonnetworks.com/images/freepbx-logo.png

 

http://members.optusnet.com.au/bsharif/elastix/CoverElastix.jpg

 

http://www.asteriskguru.com/images/logo.gif

 

 

http://images.tmcnet.com/expo/images/logos/vitelity-logo.jpg

 

 

johnj.jpgAsterisk Tips/Fixes/Features

by John Johnson

These are various Asterisk how-to items I have found/developed over the last few years. Feel free to use or share them, I look forward to adding more as I am able to compile them into a share-able format from my own notes.    

“Experience is what you don’t get until just after you needed it.”

 

Home

 Install Open Source g729 codec on Asterisk

By John Johnson 1/31/2014

   The main reason to use the g729 codec on your Asterisk system is, of course, to maximize the number of calls you can place within your available bandwidth. And there is, of course, a price to pay for it, that being reduced call quality and, ehem.. licensing fees to the copyright holders/providers. (Digium offers g729 licenses at $10 per concurrent call here). The version we are installing in this tutorial is the open source version which installs freely but may still require licensing.

   There are circumstances in which licenses are not required i.e. “g729 pass through” usage and some other circumstances. For the purposes of this tutorial we will allow the reader to assume the burden of identifying their own licensing requirements and acquiring/installing those licenses as they see fit, while we focus on how to add the codec. The steps we share here will work with or without licensing.

   I recently found it necessary to add g729 to an Asterisk system to allow it to place calls to another VOIP system that only used g729. Both parties were SIP connected to the same VSP but could not connect calls to one another in that the carrier did not provide any translation. The Asterisk system I was supporting used g711 (both ulaw and alaw) with ulaw first. The following is how I added g729 allowing calls between the two.

First things first:

Identify your processor architecture and Asterisk version; these are required to get the correct version of the codec. You can check your processor by entering the following at a linux command line prompt:

cat /proc/cpuinfo

example results:

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 28

model name      : Intel(R) Atom(TM) CPU D525   @ 1.80GHz

stepping        : 10

cpu MHz         : 1800.135

cache size      : 512 KB

 

And check your Asterisk version by entering the following at a linux command line prompt:

Asterisk –V

example results:

Asterisk 1.4.36

 

So in this example we have an Atom processor with Asterisk 1.4 and therefore need this bin file: codec_g729-ast14-gcc4-glibc-atom.so which is available at this site.

 

You can download this file directly into the appropriate folder (/usr/lib/asterisk/modules) using whatever file management tool you prefer or directly from a linux command line prompt  by entering this command from within that directory:

wget http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-atom.so

When you have the file in place you still need to change its name to match the other codecs installed, again using your favorite file management tool or the linux command line entry:

mv codec_g729-ast14-gcc4-glibc-atom.so  codec_g729.so

So you end up with a file named codec_g729.so

Now, restart Asterisk (restart not reload)

i.e. /etc/init.d/asterisk restart  or service asterisk restart

 

You can check that Asterisk has recognized and loaded the g729 codec by entering the following within the Asterisk CLI:

core show translation

example result:

http://www.asterisk-pro.com/g729/index_files/image003.jpg

 If the codec doesn’t show up as in the above example, you probably downloaded the wrong version. Check the variables (Asterisk Ver. / CPU) again and try some of the other versions for a closer match.

.

When you have g729 loaded and showing up in the translations list you still have to configure SIP within Asterisk to use it. You can do this with a simple check box in the FreePBX module “Asterisk SIP Settings” as in:

http://www.asterisk-pro.com/g729/index_files/image005.gif

Or, kick it old school and add it to /etc/asterisk/sip_general_additional.conf in the format: allow=g729

Now, reload asterisk from the Asterisk CLI “reload” or by applying your changes within FreePBX.

The above will allow your SIP trunks to accept packets in g729 and convert them for switching by your Asterisk box. To limit a VOIP trunk (SIP of IAX2) to the g729 codec you will still need to configure your SIP trunk to specify the codec and I would further recommend that you set g711 as a secondary codec to avoid the problem I was addressing that led to this write-up.

Links to reference data:

http://www.voip-info.org/wiki/view/Asterisk+codecs

http://www.voip-info.org/wiki/view/Asterisk+G.729+pass-thru

http://blog.manhag.org/2010/05/installing-the-free-g729-codec-for-asterisk/

http://www.xorcom.com/G-729-for-Asterisk-IPBX-Guidelines-for-Implementation

Home