Thursday, December 10, 2009

How to Enable G729 Codec at A2billing

How To Enable G729 Codec@A2 billing

Checking Servers Capability

debiana2b:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU E4700 @ 2.60GHz
stepping : 11
cpu MHz : 2593.559
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 5191.16
clflush size : 64
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU E4700 @ 2.60GHz
stepping : 11
cpu MHz : 2593.559
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 5186.85
clflush size : 64
power management:

debiana2b:~#


Before Add Prefix


=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
== Parsing '/etc/asterisk/asterisk.conf': Found
== Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debiana2b (pid = 10504)
Verbosity is at least 3
debiana2b*CLI>
debiana2b*CLI> core show translation
Translation times between formats (in milliseconds) for one second of data
Source Format (Rows) Destination Format (Columns)

g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722
g723 - - - - - - - - - - - - -
gsm - - 2 2 2 2 1 2 - 6 - 2 -
ulaw - 3 - 1 2 2 1 2 - 6 - 2 -
alaw - 3 1 - 2 2 1 2 - 6 - 2 -
g726aal2 - 3 2 2 - 2 1 2 - 6 - 1 -
adpcm - 3 2 2 2 - 1 2 - 6 - 2 -
slin - 2 1 1 1 1 - 1 - 5 - 1 -
lpc10 - 3 2 2 2 2 1 - - 6 - 2 -
g729 - - - - - - - - - - - - -
speex - 3 2 2 2 2 1 2 - - - 2 -
ilbc - - - - - - - - - - - - -
g726 - 3 2 2 1 2 1 2 - 6 - - -
g722 - - - - - - - - - - - - -
debiana2b*CLI>
################

#rm /usr/lib/asterisk/modules/format_g723.so
#rm /usr/lib/asterisk/modules/format_g729.so

Download suitable codec and put back at above directory

Restart Asterisk
################
#asterisk -vvvvr
#Restart now


Core show tranlation
###################

debiana2b*CLI> core show translation
Translation times between formats (in milliseconds) for one second of data
Source Format (Rows) Destination Format (Columns)

g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722
g723 - 3 2 2 2 2 1 2 3 6 - 2 -
gsm 6 - 2 2 2 2 1 2 3 6 - 2 -
ulaw 6 3 - 1 2 2 1 2 3 6 - 2 -
alaw 6 3 1 - 2 2 1 2 3 6 - 2 -
g726aal2 6 3 2 2 - 2 1 2 3 6 - 1 -
adpcm 6 3 2 2 2 - 1 2 3 6 - 2 -
slin 5 2 1 1 1 1 - 1 2 5 - 1 -
lpc10 6 3 2 2 2 2 1 - 3 6 - 2 -
g729 6 3 2 2 2 2 1 2 - 6 - 2 -
speex 6 3 2 2 2 2 1 2 3 - - 2 -
ilbc - - - - - - - - - - - - -
g726 6 3 2 2 1 2 1 2 3 6 - - -
g722 - - - - - - - - - - - - -
debiana2b*CLI>

1 comment:

vencer said...

I have installed codec g729 on centos, together with Asterisk 1.6.2.9, and a2billing

My local friends are able to use g729. However, when call out through a2billing, the codec goes out is either gsm or ulaw. I have g729 set as the first priority, ie g729,gsm,ulaw


Below is the output of core show translation


The translation time seems to be very high.
g729 gsm ulaw
g729 – 3000 1001
gsm 4999 – 1001
ulaw 4000 2001 -

how may I force g729 to be the codec sent out to my terminators