Aloha,
I recently compiled/installed OSLEC in our Asterisk 1.4.23.1 server using DAHDI 2.1.0.4 and I thought I would share some info and my experience as documentation out there is pretty sparse.
If you don’t know what you are doing, then I don’t suggest trying this. USE AT YOUR OWN RISK.
Step 1: Download the latest DAHDI and unpack it.
Step 2: Download Linux kernel source 2.6.28 or newer and unpack it.
Step 3: Make the staging/echo directories in your DADHI source tree.
$mkdir /dahdi-linux-2.1.0.4/drivers/staging
$mkdir /dahdi-linux-2.1.0.4/drivers/staging/echo
Step 4: Copy the OSLEC code from the 2.6.28 source tree into your DAHDI source tree.
$cp linux-2.6.28/drivers/staging/echo/* /dahdi-linux-2.1.0.4/drivers/staging/echo/
Step 5: Uncomment the 2 OSLEC lines in the DAHDI Kbuild file.
$vi /dahdi-linux-2.1.0.4/drivers/dahdi/Kbuild
The two lines are referenced for OSLEC. Uncomment them.
obj-m += dahdi_echocan_oslec.o
obj-m +=
Step 6: Modify the second commented line and include your path to the kernel code and the module echo.o. It should look like this:
obj-m += …/staging/echo/echo.o
Step 7: compile DAHDI
$make
One of the lines that will scroll by should look like this:
CC [M] /usr/src/asterisk/dahdi-linux-2.1.0.4/drivers/dahdi/dahdi_echocan_oslec.o
If you get the following error messages: WARNING: “oslec_create” [/usr/src/asterisk/dahdi-linux-2.1.0.4/drivers/dahdi/dahdi_echocan_oslec.ko] undefined!
WARNING: “oslec_free” [/usr/src/asterisk/dahdi-linux-2.1.0.4/drivers/dahdi/dahdi_echocan_oslec.ko] undefined!
WARNING: “oslec_update” [/usr/src/asterisk/dahdi-linux-2.1.0.4/drivers/dahdi/dahdi_echocan_oslec.ko] undefined!
It means that the second line in Kbuild is incorrect and not pointing to the echo.o code/module. Check your path.
Step 8: install DAHDI
$make install
Step 9: edit your DADHI config file. Change mg2 to oslec
$vi /etc/dahdi/system.conf
Span 1: WCT1/0 “Digium Wildcard TE110P T1/E1 Card 0” (MASTER) B8ZS/ESF
span=1,1,0,esf,b8zs
bchan=1-23
dchan=24
#echocanceller=mg2,1-23
echocanceller=oslec,1-23
Step 10: Restart DAHDI
/etc/init.d/dahdi stop/start
Step 11: Check your config
$dahdi_cfg -vvv
DAHDI Tools Version - 2.1.0.2
DAHDI Version: 2.1.0.4
Echo Canceller(s): OSLEC, MG2
Configuration
SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)
Channel map:
Channel 01: Clear channel (Default) (Echo Canceler: oslec) (Slaves: 01)
Channel 02: Clear channel (Default) (Echo Canceler: oslec) (Slaves: 02)
~
Channel 23: Clear channel (Default) (Echo Canceler: oslec) (Slaves: 23)
Channel 24: D-channel (Default) (Slaves: 24)
Setting echocan for channel 1 to oslec
Setting echocan for channel 2 to oslec
~
Setting echocan for channel 22 to oslec
Setting echocan for channel 23 to oslec
Step 12: Launch Asterisk
$asterisk
Your system should be using the OSLEC algorithm now
I hope that helps out some people. It took me a bit to figure it all out.
And part of the reason I’m posting this is to ask some questions now that I have it installed and running. The Zaptel OSLEC module has some settings that you can configure. But now that I have it compiled into DAHDI is it possible to adjust those same settings? And if so, how do I do that?
Reason being is that while echo is now at a minimum, we do get an occasional occurrence of echo, and wanting to see if I can eliminate those cases.
Thanks in advance!
Herb