G729: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
G729 and G723 Codec Install<br>
= Introduction =
Before downloading the codec module you need to verify what your processor type is, as to get a compatible compiled codec.
There are two methods describe here.  The second is to download the binary files from hosting.lv which I recommend for asterisk version 12.x.x and below.  At time of writing there are no binary files for asterisk 13.x.x so building and installing some components are required.
 
= Processor Type =
Before downloading or building the codec module you need to verify what your processor type is to ensure compatibility.


From the Linux command type in:
From the Linux command type in:
Line 6: Line 9:
cat /proc/cpuinfo
cat /proc/cpuinfo
</pre>
</pre>
Look specifically at the model name and the flags.  The following is an example of the process that I am using.
Look specifically at the model name and the flags.  The following is an example of the process that I am using.
<pre>
<pre>
Processor : 0
processor      : 0
vendor_id : GenuineIntel
vendor_id       : GenuineIntel
cpu family : 6
cpu family     : 15
model : 8
model           : 6
model name : Pentium III (Coppermine)
model name     : Intel(R) Pentium(R) D CPU 3.00GHz
stepping : 3
stepping       : 5
cpu MHz         : 648.110
microcode      : 0x7
cache size : 256 KB
cpu MHz        : 3000.249
fdiv_bug : no
cache size     : 2048 KB
hlt_bug         : no
physical id    : 0
f00f_bug : no
siblings        : 2
coma_bug : no
core id         : 0
fpu : yes
cpu cores      : 2
fpu_exception : yes
apicid          : 0
cpuid level : 2
initial apicid  : 0
wp : yes
fpu             : yes
flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx fxsr sse
fpu_exception   : yes
bogomips : 1297.41
cpuid level     : 6
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 syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl est cid cx16 xtpr pdcm lahf_lm
bogomips       : 6000.49
clflush size    : 64
cache_alignment : 128
address sizes  : 36 bits physical, 48 bits virtual
power management:
 
</pre>
</pre>


From this information we can see that it is a Pentium III processor and it is using sse.  These are the 2 bits of required information we need.  If you don’t see sse in your flags settings then the file you need must contain the words no-sse
From this information we can see that it is a Pentium D processor.  These are the 2 bits of required information we need.  If you don’t see sse in your flags settings then the file you need must contain the words no-sse


Now go to http://kvin.lv/pub/Linux/Asterisk/ and select the appropriate Asterisk version 1.6, 1.4 or 1.2 depending on the version you are using.


The files are named as codec_g72x-???-pentiumx.so
= Building =
Don't use bcg729 as it required porting for Asterisk.
== bcg729 ==
<pre>
cd /usr/src
wget http://download-mirror.savannah.gnu.org/releases/linphone/plugins/sources/bcg729-1.0.2.tar.gz
tar xvf bcg729-1.0.2.tar.gz
rm -f bcg729-1.0.2.tar.gz
cd bcg729-1.0.2


So from the information above to obtain the G729 codec we need to get the file codec_g729-gcc-pentium3.so and for the G723 codec we need to get the file g723-gcc-pentium3.so
./configure
make
make install
</pre>


The gcc represents the way the module was compiled.  This is your most likely choice.  To view the different type of compiled version look at this file http://kvin.lv/pub/Linux/Asterisk/README
== g729 ==
<pre>
cd /usr/src
wget http://asterisk.hosting.lv/src/asterisk-g72x-1.4.3.tar.bz2
bzip2 -d asterisk-g72x-1.4.3.tar.bz2
tar xvf asterisk-g72x-1.4.3.tar
rm -f asterisk-g72x-1.4.3.tar
cd asterisk-g72x-1.4.3
./autogen.sh
./configure --enable-pentiumm --with-bcg729 --with-asterisk18
</pre>


Now that we know what file we need you can now download the appropriate file.
= Binaries =
Now go to http://asterisk.hosting.lv/ and select the appropriate Asterisk version.


Change folders to /usr/lib/asterisk/modules
Change folders to /usr/lib/asterisk/modules
Line 49: Line 82:
For the G729 codec with a Pentium 4 sse chip:
For the G729 codec with a Pentium 4 sse chip:
<pre>
<pre>
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.4/codec_g729-gcc4-pentium4.so
wget http://asterisk.hosting.lv/bin/codec_g729-ast120-gcc4-glibc-x86_64-pentium4.so
</pre>
</pre>


For the G723 codec with a Pentium 4 sse chip:
For the G723 codec with a Pentium 4 sse chip:
<pre>
<pre>
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.4/codec_g723-gcc4-pentium4.so
wget http://asterisk.hosting.lv/bin/codec_g723-ast120-gcc4-glibc-x86_64-pentium4.so
</pre>
</pre>


Restart asterisk and you are done.
Restart asterisk and you are done.


If Asterisk does not start then you may need to try icc files instead of gcc.
If Asterisk does not start then you will need to use a different version of the codec files.




[[Category : Asterisk ]]
[[Category : Asterisk ]]

Latest revision as of 04:23, 27 October 2021

Introduction

There are two methods describe here. The second is to download the binary files from hosting.lv which I recommend for asterisk version 12.x.x and below. At time of writing there are no binary files for asterisk 13.x.x so building and installing some components are required.

Processor Type

Before downloading or building the codec module you need to verify what your processor type is to ensure compatibility.

From the Linux command type in:

cat /proc/cpuinfo

Look specifically at the model name and the flags. The following is an example of the process that I am using.

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 6
model name      : Intel(R) Pentium(R) D CPU 3.00GHz
stepping        : 5
microcode       : 0x7
cpu MHz         : 3000.249
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 6
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 syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl est cid cx16 xtpr pdcm lahf_lm
bogomips        : 6000.49
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

From this information we can see that it is a Pentium D processor. These are the 2 bits of required information we need. If you don’t see sse in your flags settings then the file you need must contain the words no-sse


Building

Don't use bcg729 as it required porting for Asterisk.

bcg729

cd /usr/src
wget http://download-mirror.savannah.gnu.org/releases/linphone/plugins/sources/bcg729-1.0.2.tar.gz
tar xvf bcg729-1.0.2.tar.gz
rm -f bcg729-1.0.2.tar.gz
cd bcg729-1.0.2

./configure
make
make install

g729

cd /usr/src
wget http://asterisk.hosting.lv/src/asterisk-g72x-1.4.3.tar.bz2
bzip2 -d asterisk-g72x-1.4.3.tar.bz2
tar xvf asterisk-g72x-1.4.3.tar
rm -f asterisk-g72x-1.4.3.tar
cd asterisk-g72x-1.4.3
./autogen.sh
./configure --enable-pentiumm --with-bcg729 --with-asterisk18

Binaries

Now go to http://asterisk.hosting.lv/ and select the appropriate Asterisk version.

Change folders to /usr/lib/asterisk/modules

cd /usr/lib/asterisk/modules

Download the required file(s)

For the G729 codec with a Pentium 4 sse chip:

wget http://asterisk.hosting.lv/bin/codec_g729-ast120-gcc4-glibc-x86_64-pentium4.so

For the G723 codec with a Pentium 4 sse chip:

wget http://asterisk.hosting.lv/bin/codec_g723-ast120-gcc4-glibc-x86_64-pentium4.so

Restart asterisk and you are done.

If Asterisk does not start then you will need to use a different version of the codec files.