Tech Notes

Tech Note #20100001

If you wish to take advantage of the superior echo cancellation provided by OSLEC, and you install the echo canceller as one of your DAHDI drivers, according to the instructions provided on the OSLEC Web site, you may experience problems loading the echo canceller because the symbols exported in the echo kernel driver are not visible.

Problem Description:

The echo cancellation properties of OSLEC are purported to be superior to the other echo cancellers provided with DAHDI. Unfortunately, this echo canceller is not included along with the other DAHDI drivers because it is supposed to be provided by the kernel (kernel 2.6.28 has it in the staging area). However, it is not yet actually in the kernel so an install procedure that allows the DAHDI build to build and install the staged kernel echo cancellation driver, along with a shim that passes the DAHDI echo cancellation requests on to kernel driver, is described on the OSLEC Web site.

The build procedure produces the kernel driver and shim correctly (echo.ko and dahdi_echocan_oslec.ko). But, upon loading DAHDI, the following errors occur:


modprobe: FATAL: Error inserting dahdi_echocan_oslec (/lib/modules/\
  2.6.18-164.15.1.el5/dahdi/dahdi_echocan_oslec.ko): Unknown symbol in \
  module, or unknown parameter (see dmesg)
kernel: dahdi_echocan_oslec: Unknown symbol oslec_create
kernel: dahdi_echocan_oslec: Unknown symbol oslec_update
kernel: dahdi_echocan_oslec: Unknown symbol oslec_free

Either the echo.ko echo cancellation kernel driver did not get installed properly by the DAHDI build, the dependancy between dahdi_echocan_oslec.ko and echo.ko did not get defined properly, the echo.ko module failed to load or was not loaded, or the symbols in echo.ko were not exposed properly. One way or another dahdi_echocan_oslec.ko is not finding the routines that it needs in echo.ko.

The dahdi_echocan_oslec.ko shim may begin working in later versions of the kernel, when echo.ko is actually built into it, but in the meantime DAHDI users may not be able to take advantage of OSLEC.

Problem Resolution:

For those who are using DAHDI dahdi-linux-complete-2.3.0.1+2.3.0 (and possibly other versions of DAHDI circa that timeframe), the code for the OSLEC kernel echo canceller has been rolled into the DAHDI OSLEC shim to create a single module that does echo cancellation just like the other DAHDI echo cancellers do. No need to download and build staged kernel source. The dahdi_echocan_oslec.ko built from this source simply loads and provides the Open Source Line Echo Canceller.

The source is packaged in a tarball that can be downloaded here.

To install the OSLEC source, untar it and copy the files in the subdirectory to your DAHDI build tree (note that the version number of the OSLEC tarball implies that it works with the DAHDI source that matches that version but, as we noted above, you may be able to apply it to other versions of DAHDI circa the dahdi-linux-complete-2.3.0.1+2.3.0 timeframe as well):


cd .../asterisk
tar -xvzf dahdi-linux-oslec-2.3.0.1+2.3.0.tar.gz
cp dahdi-linux-oslec-2.3.0.1+2.3.0/* dahdi-linux-complete-2.3.0.1+2.3.0/\
                                     linux/drivers/dahdi

Now, edit dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/Kbuild and uncomment the first of the two lines related to oslec. You should do something like this:


     .
     .
     .
# Only enable this if you think you know what you're doing. This is not
# supported yet:
#obj-m += dahdi_echocan_oslec.o
obj-m += dahdi_echocan_oslec.o
     .
     .
     .

Be sure not to uncomment the second line in Kbuild that adds ../staging/echo/ to the build list. The build for echo.ko is no longer required, since the source from echo.c has been rolled in to dahdi_echocan_oslec.c.

When DAHDI is built, the OSLEC echo canceller should be built too. The install will install it in the kernel tree and it should now be available for use by DAHDI-defined lines.

As noted above, this version of oslec may also be applicable to versions of DAHDI circa the dahdi-linux-complete-2.3.0.1+2.3.0 timeframe. At some point in the progression of DAHDI source, the DAHDI API used by echo cancellers changed. An attempt to build this version of oslec with the lastest version of DAHDI that works with the 2.6.18 kernel employed by RedHat 5.x/CentOS 5.x, viz. dahdi-linux-complete-2.5.1+2.5.1, failed. A version of oslec that will build under dahdi-linux-complete-2.5.1+2.5.1 and other versions of DAHDI circa its timeframe can be found in Tech_20140001.