Codecs G.729/723

HOWTO install codecs G.729 & G.723 on Elastix 4.0

Elastix, along with standart Asterisk system(Trixbox & AsteriskNOW), works passtrough mode with codec G.729 by default  (i.e. passing through with no change). To have the fully functional codec G.729 you need(actually do not 🙂 licence to purchase.

Or you can download compiled and ready module at http://asterisk.hosting.lv/

Here are some steps you should go through:

  1. Log in Elastix using ssh and type
     # asterisk -rx "core show translation"
    

    If there is no codec G729 installed you wont see it at the list, you’ll see dashes. Which means passtrough mode(no codec).

  2. Here http://asterisk.hosting.lv/ or even there оригинального сайта choose the version you need. For me (on my Corei5 working with VMWARE) for example this one was good codec_g729-ast110-gcc4-glibc-pentium.so
  3. Path to all the Asterisk modules:
    # cd /usr/lib64/asterisk/modules 
    

    (Here is the path for 32-bit system /usr/lib/asterisk/modules. All the paths are described here /etc/asterisk/asterisk.conf)

  4. Download the module you need and rename it
    # wget http://asterisk.hosting.lv/bin/codec_g729-ast110-gcc4-glibc-pentium.so
    # mv  codec_g729-ast110-gcc4-glibc-pentium.so codec_g729.so
    
  5. Load module with Elastix:
    # asterisk -rx "module load codec_g729-ast110-gcc4-glibc-pentium.so"
    

    If the module is OK for your system(CPU etc) and successfully loaded, you can see the message – Loaded codec_g729-ast110-gcc4-glibc-pentium.so

  6. Issue the command again to see the codec loaded:
    # asterisk -rx "core show translation"
  7. Not nessesary, restart your Asterisk: asterisk -rx “core restart when convenient”
  8. To have codec work sequence put the following lines at the file /etc/asterisk/sip_general_custom.conf
#cat /etc/asterisk/sip_general_custom.conf
disallow=all
allow=g729
allow=g726
allow=alaw
allow=ulaw
allow=gsm
# asterisk -rx "core restart when convenient"