TUTORIAL OSLEC install PIAF-Purple

Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
Steps for OSLEC installation on PIAF Purple

amportal stop



Code:
cd /usr/src
wget -N --no-check-certificate --no-directories  https://nodeload.github.com/mirrors/linux-2.6/tarball/master
tar xf master
mkdir –p /usr/src/dahdi/linux/drivers/staging 
cp -fR //usr/src/mirrors-linux-2.6-9e79e3e/drivers/staging/echo /usr/src/dahdi/linux/drivers/staging
sed -i "s|#obj-m += dahdi_echocan_oslec.o|obj-m += dahdi_echocan_oslec.o|" /usr/src/dahdi/linux/drivers/dahdi/Kbuild
sed -i "s|#obj-m += ../staging/echo/|obj-m += ../staging/echo/|" /usr/src/dahdi/linux/drivers/dahdi/Kbuild
echo 'obj-m += echo.o' > /usr/src/dahdi/linux/drivers/staging/echo/Kbuild
cd /usr/src/dahdi
make
make install


sed -i "s|mg2|oslec|” /etc/dahdi/system.conf
sed -i  's|#DAHDI_UNLOAD_MODULES="dahdi echo"|DAHDI_UNLOAD_MODULES="dahdi echo"|' /etc/dahdi/init.conf
dahdi_cfg –vv


reboot (shutdown –r 0) or whatever you prefer...

Comments
:

Oslec functionality is almost completely in the kernel at this point. Perhaps another revision or two and it will be there. Because of that it is getting easier to install this component and get up and running.OSLEC is an alternative, open source cancellation system for Asterisk that many have had excellent success with…

No echo cancellation scheme is perfect and you should always look to cover the basics in term of the condition of the lines involved and how they are loaded. In addition you should always be looking to properly adjust the gains on the cards and telephone sets involved. With those things set properly the echo cancellation process will have a much easier job without creating a new set of issues.
The process outlined has been tested with PIAF Purple.
As I said OSLEC should be fully “built in” soon. When that happens you’ll be able to select it as easily as any of the existing choices like mg2.

GitHub is used for “echo” files download because of recent security and availability issues involving the kernel.org site.

What is being done:

We switch to the appropriate directory, download a recent revision of Linux, decompress the archive,copy the appropriate section into the directory structure that the “make” expects, un-comment two lines in a file, add a line to the Kbuild file, switch directories, compile, install. The last two sed lines are a further part of the configuration. You can use these two sed commands or go into the files and edit them yourself. Either way, when done, do a dahdi_cfg -vv

When all is said and done if you change mg2 to oslec in the etc/dahdi/system.conf file, run dahdi_cfg –vv and there is no error message you’ve been successful.

Note: During the "make" process there is a warning regarding a couple of vpmadt032 related files. Please disregard those warnings.

Best of Luck,
Brian Kelly

This "how to" version pulls together previous articles from various places, makes changes, adds further explanation and has been tested with the current Purple
 
Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
Sorry I don't.. thanks for the bracketing suggestion. I had tried to just turn the link off but it kept coming back!
 

luckman212

Guru
Joined
Jul 7, 2010
Messages
272
Reaction score
0
briankelly63- yes, thanks so much for sharing this! :cheers2:
I haven't tried it yet but I am earmarking this for the near future.

You say in the top post that "Oslec functionality is almost completely in the kernel" -- do the recent centOS6.x based PIAF distros change this at all? any closer to having oslec baked in?
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
Ward, this thread should be moved to the Add-on Install Instructions forum topic.
 

euser4life

Guru
Joined
Dec 18, 2007
Messages
223
Reaction score
0
+1

OSLEC is far superior to the built in MG2 cancellation. Wish it was the default for those of use that still deal with analog.
 
Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
In response to your question regarding the status of kernel integration I contacted the author of one of the source documents I used in the preparation of my instructions.... Here is his response:

Right now I maintain OSLEC outside of the kernel as I have to maintain a set of extra drivers anyway:

https://gitorious.org/dahdi-extra/dahdi-linux-extra

That said, I'd be happy to get some cooperation there from device manufacturers. Right now those drivers don't build with DAHDI 2.6 .

The problem with OSLEC in the mainline kernel tree is that it does not expose any interface to be used. Thus it is not useful on its own. It is not clear just what this interface should be.

I hope DAHDI itself will be moving closer to mainline kernel. But this is a slow process.
 

aglasser

New Member
Joined
Feb 16, 2012
Messages
6
Reaction score
0
Received "DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument(22)"

Went ahead and modified modules, but nada.

Edit:

That was with Dahdi 2.5. Reverted to 2.4 and that disappeared.
 

BrianM

New Member
Joined
Oct 2, 2013
Messages
2
Reaction score
0
Brian, these directions were invaluable in helping me build in Oslec with Dahdi. Just loading Oslec as the default EC has made a noticeable difference in our line quality on PTSN calls.

I have noticed there is very little documentation on Oslec and further tweaking. Is the echotraining parameter the only further are for tuning?
Thanks.

PBX in a Flash Version = 1.7.5.6 Running on *HARDWARE*
FreePBX Version = 2.10.1.4
Running Asterisk Version = 1.8.5.0
Asterisk Source Version = 1.8.5.0
Dahdi Source Version = 2.6.1+2.6.1
Libpri Source Version = 1.4.12
 

stevenv

New Member
Joined
May 6, 2015
Messages
1
Reaction score
2
Updated OSLEC Installation Instructions

After much research and testing, I have compiled an updated and simplified set of instructions for installing OSLEC. I make no guarantees this will work for you, but it worked for me on Ubuntu 14.04.2 LTS after installing IncrediblePBX 11. These steps are based on the instructions posted by Brian Kelly above and David Rowe at:
http://www.rowetel.com/blog/?page_id=454

Code:
amportal stop
 
service dahdi stop
 
cd /usr/src
 
wget -N –-no-check-certificate https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.xz
tar xf linux-3.13.tar.xz
mkdir –p /usr/src/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/staging
cp -fR /usr/src/linux-3.13/drivers/staging/echo /usr/src/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/staging
cd /usr/src/dahdi-linux-complete-2.10.2+2.10.2
make
make install
 
sed -i "s|mg2|oslec|" /etc/dahdi/system.conf
sed -i 's|#DAHDI_UNLOAD_MODULES="dahdi echo"|DAHDI_UNLOAD_MODULES="dahdi echo"|' /etc/dahdi/init.conf
 
service dahdi start
dahdi_cfg -vv
 
amportal start
 
cd /usr/src
rm -r linux-3.13*


Comments:

It may be necessary to modify the steps if your linux kernel or dahdi versions differ from mine.

The above steps are still necessary because after several years apparently OSLEC is still in the staging branch of the linux kernel. It is no longer necessary to modify the Kbuild file, as logic is already in place to detect if there are files in the staging branch.

Removing the downloaded kernel files is optional, but they take up half a GB so I chose to clean up afterwards, since the necessary oslec source files remain in place under the dahdi source folder if you need to recompile at a later time. As an alternative, the kernel files can be downloaded to your desktop, extracted, and the required files uploaded to the proper directory using (win)scp, sftp, etc.

OSLEC made a dramatic difference for me when using an X100P card and was much better than the default mg2 echo cancellation (in my case the echo was over 40%). The difference was less dramatic with a TDM410P adapter after tuning the card with fxotune, but it was still effective in removing the residual echo.
 

Members online

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top