Freepbx and dahdi with Digium TDM800P

Hi,
I am not sure if I am having a configuration problem on dahdi or freepbx. Before I was running asterisk 1.8 with freepbx (2.somethine I guess) on a Ubuntu 10.04 LTS server, all the analog phones and trunks were connected to a Cisco SPA8800 with 4 FXS and 4 FXO. Due to the problem of not being able to update the server as the 10.04 LTS have got to its end of the line we switched the server to a new one running Ubuntu 15.04 LTS. I have compiled and installed Dahdi (2.10.2), libpri-1.4.15, iksemel-1.4, pjproject (latest version), asterisk-12.8.2 and FreePBX 12. All by following the installation instructions on freepbx wiki.

On this new server I added a Digium TDM844P (4 FXO and 4FXS). I’ve followed the instructions for dahdi and groups are 0 for FXO channels (channels 5 to 8) and group 5 for FXS channels (1 to 4).

Everything seems to be working fine even the Cisco ATA however if I have inbound or outbound calls going through the FXO channels on the TDM844P and those calls are connected to analog phones on any channel of this same card the users can hear the other phone calls. It is not echo but some sort interference. I am not sure if I have to separate the channels on different groups on the dahdi config or what.

Strangely enough I didn’t have this issue before dahdi module from Freepbx made some changes on the dahdi config.

Here is what I have after Freepbx changes (comments removed)
->/etc/dahdi/modules:
wctdm24xxp
wctdm <- not sure why it is loading this module as well as it is for the TDM400P

->/etc/dahdi/system.conf:
fxsks=5-8
echocanceller=oslec,5-8
fxoks=1-4
echocanceller=oslec,1-4
loadzone=br
defaultzone=br

->/etc/asterisk/chan_dahdi.conf
[general]
#include chan_dahdi_general.conf
#include chan_dahdi_general_custom.conf

[channels]
language=br
busydetect=yes
busycount=5
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=no
faxdetect=incoming
rxgain=1.0
txgain=2.0
dtmfcidlevel=256
mohinterpret=default
mohsuggest=default
cidsignalling=dtmf
cidstart=dtmf
hidecallerid=no
callwaitingcallerid=yes
canpark=yes
relaxdtmf=yes

#include chan_dahdi_channels_custom.conf
#include chan_dahdi_groups.conf
#include chan_dahdi_additional.conf

->/etc/asterisk/chan_dahdi_groups.conf:
signalling=fxs_ks
context=from-analog
group=0
channel=>5

signalling=fxs_ks
context=from-analog
group=0
channel=>6

signalling=fxs_ks
context=from-analog
group=0
channel=>7

signalling=fxs_ks
context=from-analog
group=0
channel=>8

signalling=fxo_ks
context=from-analog
group=5
channel=>1

signalling=fxo_ks
context=from-analog
group=5
channel=>2

signalling=fxo_ks
context=from-analog
group=5
channel=>3

signalling=fxo_ks
context=from-analog
group=5
channel=>4

->/etc/asterisk/chan_dahdi_additional.conf (analog phones connected):
;;;;;;[103]
signalling=fxo_ks
pickupgroup=
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=<103>
busydetect=no
busycount=7
accountcode=
channel=>1
;;;;;;[104]
signalling=fxo_ks
pickupgroup=
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=<104>
busydetect=no
busycount=7
accountcode=
channel=>2
;;;;;;[105]
signalling=fxo_ks
pickupgroup=
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=<105>
busydetect=no
busycount=7
accountcode=
channel=>3

On FreePbx interface I have created 3 dahdi trunks (channels 8, 7 and 6; channel 5 is not connected to anything) and separated inbound and outbound routes. On the dial plan I have the trunks ordered on the following sequence trunk 8, trunk 7, trunk6, and then the trunks from Cisco ATA.

Am I missing something on the setup? Should I create one group for each dahdi channel? By the way the phone lines here only have 1 pair therefore it is not possible to establish more than one call at same time on each channel, I mention that as I heard some countries have 2 pairs on each line and can hold 2 simultaneous calls at same time on the channel I am not even sure if this information is correct but if it is that is not our case here and could explain the issue as on the logs I can see sometimes that lets say channel 1 (extension 103) is currently in a call using trunk 8 (channel 8) and then channel 2 (extension 104) tries to place a call and get this interference on the logs I see that channel 2 is trying to establish a connection on channel 8 as well instead of 7.

Did someone had a similar problem here, or any clue on what did I do wrong on the setup?
Thanks in advance

Oslec was actually compiled in dahdi ?

lsmod | grep oslec

Yes, sorry I forgot to mention that, it was compiled. Here is the output of lsmod:
lsmod | grep oslec
dahdi_echocan_oslec 16384 8
echo 16384 1 dahdi_echocan_oslec
dahdi 229376 19 wctdm24xxp,dahdi_echocan_oslec,dahdi_voicebus