Echo cancellation does not work

Building backup Asterisk server, using working config from another system. The problem - it seems that the echo cancellation does not work. It is enabled, loaded and activated, but when I make call from an analog PBX via E1 (Digium TE235) to SIP phone on Asterisk, I hear echo on SIP phone. I use Oslec, installed according to the instructions:

mkdir / usr / src / dahdi / linux / drivers / staging
cp -fR /usr/src/linux-3.16.7/drivers/misc/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

The only thing with that, path must be /usr/src/linux-X.X.X/drivers/staging/echo, but I figured it was changed to … /misc/echo.

Tried to use mg2 - same results. If I turn off echo cancellation on the main system for the experiment, then I hear absolutely the same echo - one to one. It seems that Asterisk just ignores echocancel = yes on the new system. Otherwise, everything works as it should, except echo. What is confusing is that nowhere in the logs there are no errors.

Debian 8.4 - 3.16.0-4-amd64 # 1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU / Linux
DAHDI Version: 2.11.1
Asterisk 1.8.32.3
libpri version: 1.5.0

Maybe DAHDI compiled wrong? Or Oslec conflicts with something?

Your DAHDI system.conf file needs to specify that you want to use an echo canceller, e.g.

echocanceller=oslec,1-15,17-30,31-45,47-61

We also always recommend the use of the hardware-based cancellers, as customers have better success with them than with the software-based cancellers.