I lay out instructions for assembling and installing the G729 and G723 codecs for Asterisk from source code, test assembly was performed on a thin HP client and on a 64-bit server.
Codec. G729 One of the best codecs in terms of quality to audio stream compression. It is used in most cases if there are restrictions on the bandwidth of traffic. For its use in industrial use, a license is required. The License Agreement can be read on page of the license agreement. The G729 uses a compression rate of 8 Kbps, which is 8 times less than the standard alaw G711 codec.
To calculate the bandwidth, you can use calculator.
Dano:
Asterisk 1.8 is installed according to the instructions: Install Asterisk 1.8 in Debian Squeeze or Ubuntu Linux, build from VOIP Asterisk source
or:
Asterisk 1.8 is installed according to the instructions: Installing Asterisk PBX 11 on Debian or Ubuntu Linux
Go to the folder where we have the source code installed Asterisk, dahdi, libpri, If there is no folder, we will create it by completing the command:
mkdir -p /usr/src/asterisk-src/ && cd /usr/src/asterisk-src/
Download the source codecs on the official website team:
wget http://asterisk.hosting.lv/src/asterisk-g72x-1.1.tar.bz2
If the official site does not have this archive, or the site is not available, then you can download this archive from my website by following the command:
wget http://softnastroy.com/downloads/asterisk/asterisk-g72x-1.1.tar.bz2
Unpack the downloaded archive, go to the unpacked folder and start configuring the codec by executing the commands:
tar xvf asterisk-g72x-1.1.tar.bz2 cd asterisk-g72x-1.1 ./configure --with-ipp=ipp/
Modifying the file. build-itu.sh
vi build-itu.sh
For Asterisk 1.8:
was:
# Asterisk 1.8 inc=/home/arkadi/opt/asterisk-1.8.0/include def=-DG72X_ASTERISK=18
became:
inc=/usr/src/asterisk-src/asterisk-1.8.28.2/include def=-DG72X_ASTERISK=18
For Asterisk 11:
was:
# Asterisk 10.0 inc=/home/arkadi/opt/asterisk-10.0/include def=-DG72X_ASTERISK=10
became:
# Asterisk 11.0 inc=/usr/src/asterisk-src/asterisk-11.20.0/include/ def=-DG72X_ASTERISK=110
By the way, to install on Asterisk versions not 1.8, but for example Asterisk 1.4, Asterisk 1.6 or Asterisk 10, you need to comment on the unnecessary and decomment the desired version of Asterisk, as well as correct the path of finding the source installed Asterisk in the file. build-itu.sh
Run the edited file with the command:
sh build-itu.sh
After assembling the codecs, copy the G723 and G729 codecs with the command:
cp codec_g72*.so /usr/lib/asterisk/modules/
Reboot Asterisk with the command:
/etc/init.d/asterisk restart
Check if the codecs are connected using the console asterisk launcher rasterisk either asterisk -r and running a command in the console. core show translation:
rasterisk
voip*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 - 84005 72005 72005 84005 72005 72004 92005 460028 -148009 84005 76004 - - 88004 - - 72005
gsm 1196075 - 4002 4002 16002 4002 4001 24002 392025 - 80006 16002 8001 - - 20001 - - 4002
ulaw 1192075 12002 - 4000 12002 2 1 20002 388025 - 76006 12002 4001 - - 16001 - - 2
alaw 1192075 12002 1 - 12002 2 1 20002 388025 - 76006 12002 4001 - - 16001 - - 2
g726aal2 1200075 20002 8002 8002 - 8002 8001 28002 396025 - 84006 20002 12001 - - 24001 - - 8002
adpcm 1196074 16001 4001 4001 16001 - 4000 24001 392024 - 80005 16001 8000 - - 20000 - - 4001
slin 1192074 12001 1 1 12001 1 - 20001 388024 - 76005 12001 4000 - - 16000 - - 1
lpc10 1204075 24002 12002 12002 24002 12002 12001 - 400025 - 88006 24002 16001 - - 28001 - - 12002
g729 1272079 92006 80006 80006 92006 80006 80005100006 - -156010 92006 84005 - - 96005 - - 80006
speex - - - - - - - - - - - - - - - - - - -
ilbc 1204075 24002 12002 12002 24002 12002 12001 32002 400025 - - 24002 16001 - - 28001 - - 12002
g726 1196074 16001 4001 4001 16001 4001 4000 24001 392024 - 80005 - 8000 - - 20000 - - 4001
g722 1200074 20001 8001 8001 20001 8001 8000 28001 396024 - 84005 20001 - - - 12000 - - 8001
siren7 - - - - - - - - - - - - - - - - - - -
siren14 - - - - - - - - - - - - - - - - - - -
slin16 1208074 28001 16001 16001 28001 16001 16000 36001 404024 - 92005 28001 8000 - - - - - 16001
g719 - - - - - - - - - - - - - - - - - - -
speex16 - - - - - - - - - - - - - - - - - - -
testlaw 1192075 12002 2 2 12002 2 1 20002 388025 - 76006 12002 4001 - - 16001 - - -
voip*CLI>We see our connected codecs on the list. G729 and G723.
To connect codecs to Asterisk, you need to enter data into sip.conf
was:
disallow=all ; First disallow all codecs allow=alaw ; Allow codecs in order of preference
became:
disallow=all ; First disallow all codecs allow=g729 allow=alaw ; Allow codecs in order of preference
If you each client is prescribed how to use a codec, then he needs to prescribe the same and codec. g729 file-based sip.conf
In order to see what codecs are used at a given time, you need to execute the command in the Asterisk console. sip show channels And watch the column. Format:
rasterisk voip*CLI> sip show channels Peer User/ANR Call ID Format Hold Last Message Expiry 192.168.XXX.XXX XXXXXXXXXX XXXXXXXXXXXXX 0x100 (g729) No Rx: ACK 192.168.XXX.XXX XXXXXXXXXX XXXXXXXXXXXXX 0x8 (alaw) No Rx: ACK 192.168.XXX.XXX XXX XXXXXXXXXXXXX 0x8 (alaw) No Init: INVITE 192.168.XXX.XXX XXX XXXXXXXXXXXXX 0x100 (g729) No Rx: ACK 192.168.XXX.XXX XXX XXXXXXXXXXXXX 0x8 (alaw) No Init: INVITE 192.168.XXX.XXX XXX XXXXXXXXXXXXX 0x100 (g729) No Tx: ACK 6 active SIP dialogs
The task is accomplished, the G723 and G729 codecs are assembled and installed, and the G729 codec is connected to Asterisk.
I was with you. Sergey Lazarenko.
Let's watch a beautiful performance of a 7-year-old boy on the bar:



comment