Compile Codec G723, G729 + Asterisk + centos 6.2 64 bit


Sedikit info bagi para pembaca, adapun latar belakang dilakukan compile codec di asterisk server adalah:

  1. Dari SBC telkom berbasis SIP via line FO.
  2. Bandwidh FO terbatas dan diperkirakan untuk 1 MB  call pararelel (maksimum) hanya 16 call jika menggunakan codec default alaw or ulaw (65-87.2 KB)
  3. Secara default asterisk belum tersedia codec G729 sementara di SBC telkom sudah support codec G729 ( Maka dengan pemilihan codec ini diharapkan jumlah call pararel akan lebih banyak)

Bandwidh comsumption untuk masing-masing codec dapat dilihat di http://www.voip info.org/wiki/view/Bandwidth+consumption

Codec BR NEB
G.711 64 Kbps 87.2 Kbps
G.729 8 Kbps 31.2 Kbps
G.723.1 6.4 Kbps 21.9 Kbps
G.723.1 5.3 Kbps 20.8 Kbps
G.726 32 Kbps 55.2 Kbps
G.726 24 Kbps 47.2 Kbps
G.728 16 Kbps 31.5 Kbps
iLBC 15 Kbps 27.7 Kbps

Berikut adalah cara compile codec di centos 6.2 (64 bit version)

[root@ecentrix6 asterisk]# uname -a
Linux ecentrix6 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

 

CPU info

[root@ecentrix6 asterisk]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
stepping : 7
cpu MHz : 2364.539
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good pni ssse3 lahf_lm
bogomips : 4729.07
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
stepping : 7
cpu MHz : 2364.539
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good pni ssse3 lahf_lm
bogomips : 4767.37
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

 Asterik version

[root@ecentrix6 asterisk]# asterisk -r
Asterisk 1.8.8.1, Copyright (C) 1999 – 2011 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
=========================================================================
Connected to Asterisk 1.8.8.1 currently running on ecentrix6 (pid = 6019)
Verbosity is at least 3

Default asterisk belum support G273 or G729

ecentrix6*CLI> core show translation

g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 siren7 siren14 slin16 g719 speex16 testlaw

g723 – 1001 2 2 3001 2 1 1000 3001 – – 1001 1000 – – 1001 – – 2

g729     –     –     –     –        –     –     –     –     –     –     –     –     –      –       –      –     –       –       –

Codec yang digunakan untuk processor diatas:
http://asterisk.hosting.lv/bin/codec_g723-ast18-gcc4-glibc-x86_64-opteron.so
http://asterisk.hosting.lv/bin/codec_g729-ast18-gcc4-glibc-x86_64-opteron.so

[root@ecentrix6 asterisk] cp codec_g729-ast18-gcc4-glibc-x86_64-opteron.so /usr/lib/asterisk/module/codec_g729.so

ecentrix6*CLI> dialplan reload

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

g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 siren7 siren14 slin16 g719 speex16 testlaw
g723 – 1001 2 2 3001 2 1 1000 3001 – – 1001 1000 – – 1001 – – 2
gsm 10000 – 2 2 3001 2 1 1000 3001 – – 1001 1000 – – 1001 – – 2
ulaw 10000 1001 – 1 3001 2 1 1000 3001 – – 1001 1000 – – 1001 – – 2
alaw 10000 1001 1 – 3001 2 1 1000 3001 – – 1001 1000 – – 1001 – – 2
g726aal2 10000 1001 2 2 – 2 1 1000 3001 – – 1001 1000 – – 1001 – – 2
adpcm 10000 1001 2 2 3001 – 1 1000 3001 – – 1001 1000 – – 1001 – – 2
slin 9999 1000 1 1 3000 1 – 999 3000 – – 1000 999 – – 1000 – – 1
lpc10 10999 2000 1001 1001 4000 1001 1000 – 4000 – – 2000 1999 – – 2000 – – 1001
g729 10998 1999 1000 1000 3999 1000 999 1998 – – – 1999 1998 – – 1999 – – 1000
speex – – – – – – – – – – – – – – – – – – –
ilbc – – – – – – – – – – – – – – – – – – –
g726 10999 2000 1001 1001 4000 1001 1000 1999 4000 – – – 1999 – – 2000 – – 1001
g722 10000 1001 2 2 3001 2 1 1000 3001 – – 1001 – – – 1 – – 2
siren7 – – – – – – – – – – – – – – – – – – –
siren14 – – – – – – – – – – – – – – – – – – –
slin16 11000 2001 1002 1002 4001 1002 1001 2000 4001 – – 2001 1000 – – – – – 1002
g719 – – – – – – – – – – – – – – – – – – –
speex16 – – – – – – – – – – – – – – – – – – –
testlaw 10000 1001 2 2 3001 2 1 1000 3001 – – 1001 1000 – – 1001 – – –

Huruf tebal menunjukkan bahwa asterisk sudah mendukung codec G729

Konfigurasi di sip.conf asterisk (SIP TRUNK)

vim /etc/asterisk/sip.conf

[1000]
type=friend
secret=1000
username=1000
callerid=”1000″ <1000>
host=192.168.0.4
directmedia=no
context=outbound
qualify=yes
disallow=all
allow=g729 ; GSM consumes far less bandwidth than ulaw
allow=g723
allow=ulaw
allow=alaw
canreinvite=no
dtmfmode=auto
rfc2833compensate=yes

[101]
context=outbound
type=friend
username=101
secret=101
host=dynamic
disallow=all
allow=ulaw
allow=alaw
qualify=yes
canreinvite=no
insecure=port,invite
dtmfmode=rfc2833
nat=no

vim /etc/asterisk/extensions.conf

[outbound]
exten => _9X.,1,NoOp(FO)
exten => _9X.,n,Dial(SIP/1000/${EXTEN:1},${DIAL_TIMEOUT},tT${DIAL_OPTIONS})
exten => _9X.,n,NoOp(${HANGUPCAUSE} DAN ${DIALSTATUS})
exten => _9X.,n,Hangup()

Testing

Test call dari softphone ke salah satu nomor PSTN
dan monitor via CLI asterisk  dengan command

ecentrix6*CLI> sip show channels

Thanks

*******************************************************************
IPBX
Compile Codec

 

 

 

 

 

 

Advertisements

One thought on “Compile Codec G723, G729 + Asterisk + centos 6.2 64 bit

  1. Ubuntu Server Help August 19, 2014 at 4:12 am Reply

    whoah this blog is excellent i like studying yoyr articles.
    Stay up the great work! You realize, many persons are huning around for this information,
    you could help them greatly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: