Difference between revisions of "OSLEC installation with DAHDI"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(6 intermediate revisions by 2 users not shown)
Line 13: Line 13:


  cd /usr/src
  cd /usr/src
  wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
  wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
  tar xvfz dahdi-linux-current.tar.gz
  tar xvfz dahdi-linux-current.tar.gz


= Downlaod and unpack your Linux kernel sources =
= Download and unpack your Linux kernel sources =


At this stage make sure you download the correct kernel sources
At this stage make sure you download the correct kernel sources
Line 39: Line 37:


  mkdir /usr/src/dahdi-linux-2.5.0.1/drivers/staging
  mkdir /usr/src/dahdi-linux-2.5.0.1/drivers/staging
  cp -fR /usr/src/linux-2.6.28/drivers/staging/echo /usr/src/dahdi-linux-2.5.0.1/drivers/staging
  cp -fR /usr/src/linux-2.6.28/drivers/staging/echo /usr/src/dahdi-linux-2.5.0.1/drivers/staging
  sed -i "s|#obj-m += dahdi_echocan_oslec.o|obj-m += dahdi_echocan_oslec.o|" /usr/src/dahdi-  linux-2.5.0.1/drivers/dahdi/Kbuild
  sed -i "s|#obj-m += dahdi_echocan_oslec.o|obj-m += dahdi_echocan_oslec.o|" /usr/src/dahdi-  linux-2.5.0.1/drivers/dahdi/Kbuild
  sed -i "s|#obj-m += ../staging/echo/|obj-m += ../staging/echo/|" /usr/src/dahdi-linux-2.5.0.1/drivers/dahdi/Kbuild
  sed -i "s|#obj-m += ../staging/echo/|obj-m += ../staging/echo/|" /usr/src/dahdi-linux-2.5.0.1/drivers/dahdi/Kbuild
  echo 'obj-m += echo.o' > /usr/src/dahdi-linux-2.5.0.1/drivers/staging/echo/Kbuild
  echo 'obj-m += echo.o' > /usr/src/dahdi-linux-2.5.0.1/drivers/staging/echo/Kbuild


= Compile DAHDI =  
= Compile DAHDI and DAHDI tools =  


  cd / usr/src/dahdi-linux-2.4.1.2
  cd / usr/src/dahdi-linux-2.4.1.2
  make
  make
  make install
  make install
   
   
Line 59: Line 51:


  cd /usr/src
  cd /usr/src
  wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz
  wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz
tar xvfz dahdi-tools-current.tar.gz
cd dahdi-tools-2.4.1
./configure
make
make install
make config


tar xvfz dahdi-tools-current.tar.gz
= Check the results =


cd dahdi-tools-2.4.1
After everything has been done, run the following command


  ./configure
  updatedb


make
Check if OSLEC was installed:
   
   
  make install
locate oslec | grep /lib/modules
 
You should see similar output:
 
  /lib/modules/2.6.18-238.9.1.el5/dahdi/dahdi_echocan_oslec.ko
 
= See also =


make config
Alternative guide can be found [http://forums.digium.com/viewtopic.php?t=67164 here]

Latest revision as of 08:17, 21 October 2011


What is OSLEC?

Oslec is an open source high performance line echo canceller. When used with Asterisk it works well on lines where the built-in Zaptel echo canceller fails.
No tweaks like rxgain/txgain or fxotrain are required. Oslec is supplied as GPL licensed C source code and is free as in speech.

More information can be found here

Attention - this manual is addressed to MOR users who are experienced in Linux and Asterisk!

Download and unpack Dahdi

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
tar xvfz dahdi-linux-current.tar.gz

Download and unpack your Linux kernel sources

At this stage make sure you download the correct kernel sources

Check the current kernel by using command


[root@linux ~]# uname -a
Linux ns205179.ovh.net 2.6.28-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Next, download the kernel sources

wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2

Unpack

tar xvfz linux-2.6.28.tar.bz2

Prepare the downloaded DAHDI sources to compile with OSLEC included

mkdir /usr/src/dahdi-linux-2.5.0.1/drivers/staging
cp -fR /usr/src/linux-2.6.28/drivers/staging/echo /usr/src/dahdi-linux-2.5.0.1/drivers/staging
sed -i "s|#obj-m += dahdi_echocan_oslec.o|obj-m += dahdi_echocan_oslec.o|" /usr/src/dahdi-   linux-2.5.0.1/drivers/dahdi/Kbuild
sed -i "s|#obj-m += ../staging/echo/|obj-m += ../staging/echo/|" /usr/src/dahdi-linux-2.5.0.1/drivers/dahdi/Kbuild
echo 'obj-m += echo.o' > /usr/src/dahdi-linux-2.5.0.1/drivers/staging/echo/Kbuild

Compile DAHDI and DAHDI tools

cd / usr/src/dahdi-linux-2.4.1.2
make
make install

Download and install DAHDI tools

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz
tar xvfz dahdi-tools-current.tar.gz
cd dahdi-tools-2.4.1
./configure
make
make install
make config

Check the results

After everything has been done, run the following command

updatedb

Check if OSLEC was installed:

locate oslec | grep /lib/modules

You should see similar output:

/lib/modules/2.6.18-238.9.1.el5/dahdi/dahdi_echocan_oslec.ko

See also

Alternative guide can be found here