chan_dahdi.c: Unable to enable echo cancellation on channel

I have terrible echo when calls come in or go out on my POTS lines. I have a TDM400P with four FXO boards. I believe that I have enabled echo cancellation, but it doesn’t seem to do anything.

I get the following error in the logs when a call comes in:

chan_dahdi.c: Unable to enable echo cancellation on channel 2 (No such device)

It does not matter which channel.

If anyone could help, I would appreciate it.

My chan_dahdi.conf file is as follows:

[trunkgroups]

[channels]
; hardware channels

; default for channels inherited to all channels
;usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echotraining=yes
rxgain=0.0
txgain=0.0
signaling=fxs_ks ; FXO channels use FXS signalling

;define channels
context=incoming_ofc ; standard office line (inherited to lines 1, 2 & 3)
channel => 1
channel => 2
channel => 3
context=incoming_mkt ; marketing line
channel => 4