Installing G.729 and G.723.1 codecs on Asterisk

Average: 3.3 (313 votes)

This small how-to describes the installation G.729 and G.723.1 codecs on Asterisk.

Getting the codec modules

Precompiled codec modules can be found here: http://asterisk.hosting.lv/

Choose the one that matches your asterisk version and system architecture.

To find out your system info open a console and type:

uname -a

you should get something similar to this:

Linux chimera 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:24:35 UTC 2011 i686 GNU/Linux

to get CPU specific info type:

cat /proc/cpuinfo

and you get:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 9
cpu MHz : 2800.530
cache size : 512 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up pebs bts cid xtpr
bogomips : 5601.06
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 32 bits virtual
power management:

Installing the modules

Go to /usr/lib/asterisk/modules folder

cd /usr/lib/asterisk/modules

download the codec modules that fits your system, for example:

wget http://asterisk.hosting.lv/bin/codec_g723-ast18-gcc4-glibc-pentium4.so
wget http://asterisk.hosting.lv/bin/codec_g729-ast18-gcc4-glibc-pentium4.so

restart Asterick using

/etc/init.d/asterisk restart

or

service asterisk restart

Connect to asterick console and check that codecs are available

asterisk -r
tehserver*CLI> core show translation
           g723   gsm  ulaw  alaw g726aal2 adpcm  slin lpc10  g729 speex  ilbc  g726  g722 siren7 siren14 slin16  g719 speex16 testlaw
     g723     -     2     2     2     4001     2     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       2
      gsm 12002     -     2     2     4001     2     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       2
     ulaw 12002     2     -     1     4001     2     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       2
     alaw 12002     2     1     -     4001     2     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       2
 g726aal2 12002     2     2     2        -     2     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       2
    adpcm 12002     2     2     2     4001     -     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       2
     slin 12001     1     1     1     4000     1     -  4000  4000  8000 16001  4001     1      -       -      1     -    8002       1
    lpc10 12002     2     2     2     4001     2     1     -  4001  8001 16002  4002     2      -       -      2     -    8003       2
     g729 12002     2     2     2     4001     2     1  4001     -  8001 16002  4002     2      -       -      2     -    8003       2
    speex 12002     2     2     2     4001     2     1  4001  4001     - 16002  4002     2      -       -      2     -    8003       2
     ilbc 16001  4001  4001  4001     8000  4001  4000  8000  8000 12000     -  8001  4001      -       -   4001     -   12002    4001
     g726 12002     2     2     2     4001     2     1  4001  4001  8001 16002     -     2      -       -      2     -    8003       2
     g722 12002     2     2     2     4001     2     1  4001  4001  8001 16002  4002     -      -       -      1     -    8002       2
   siren7     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
  siren14     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
   slin16 12003     3     3     3     4002     3     2  4002  4002  8002 16003  4003     1      -       -      -     -    8001       3
     g719     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
  speex16 12004     4     4     4     4003     4     3  4003  4003  8003 16004  4004     2      -       -      1     -       -       4
  testlaw 12002     2     2     2     4001     2     1  4001  4001  8001 16002  4002     2      -       -      2     -    8003       -

Here you can see the translation times from one codec to another. Source is Rows and destination is Columns.

Any number in G729 and G723 row/column indicates that the codec is enabled.

glqxz9283 sfy39587stf02 mnesdcuix8
sfy39587stf03
sfy39587stf04