[Home]

Summary:DAHLIN-00098: DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument(22) on Gentoo
Reporter:Shaun Ruffell (sruffell)Labels:
Date Opened:2009-04-29 10:37:34Date Closed:2012-01-09 09:29:36.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:dahdi (the module)
Versions:2.1.0.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:On Gentoo, it appears that the kernel is not configured to allow auto loading of modules.  This prevents the DAHDI_ATTACH_ECHOCAN from loading the software echo canceler requested in the /etc/dahdi/system.conf file, and the result is an error like:

"DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument(22)"

To work around this the "dahdi_echocan_<name of echocan>" could be added to /etc/dahdi/modules

I.e.  If you have mg2 configured as the echo canceler in /etc/dahdi/system.conf, add the line "dahdi_echocan_mg2" to /etc/dahdi/modules.
Comments:By: Tzafrir Cohen (tzafrir) 2009-05-18 10:55:37

The same mechanism is used with dahdi_dynamic drivers, btw.

I think that the fix is to document the issue. And such documentation is indeed missing.

By: Leif Madsen (lmadsen) 2009-09-21 10:36:25

Acknowledging the issue. Changed severity to 'text' per tzafrir, but someone can change it back (or have it requested) to major.

By: Michael Higgins (mykhyggz) 2010-01-06 15:17:02.000-0600

So, being a Gentoo user and getting "DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument(22) " when trying to change EC to oslec (or hpec even) rather than mg2, I find adding the module name as indicated didn't make any difference.

Probably I'm missing some key element that isn't fully documented in the brief explanation here. ;-) FWIW, the ebuild I'm using *appears* to build oslec fine. Anyway, my EC situation is "good enough" with mg2, but I'm keen to give oslec a try.

By: Michael Higgins (mykhyggz) 2010-01-06 16:02:32.000-0600

Okay, EC situation is WAY far better with oslec. Turns out, by chance seeing this patch applied in my Gentoo ebuild "files/dahdi-2.2.0.2-no-depmod.patch" led me to a WAG... and so I ran "depmod". (I have no real idea why this would be needed, just guessed after reading the man page.)

Suddenly alternative-to-mg2 echocan modules loaded w/o a problem. What is that all about? Basically, when I tried to modprobe the module directly, it was "not found". Weird.

By: Reporter (mancy) 2010-09-30 19:47:09

same problem happened to me after building the dahdi v 2.4 driver from source code

i've tried to use dahdi_echocan_oslec but still DAHDI_ATTACH_ECHOCAN

i fixed this by using mg2 echo cancellation
it doesn't matter if i put dahdi_echocan_mg2 or not, no error shown in both cases

system: centos kernel 2.6.18-194.3.1.el5

By: Shaun Ruffell (sruffell) 2010-09-30 19:55:13

mancy: You must be hitting something different if just switching to mg2 fixed the problem for you.  My guess is that OSLEC wasn't built properly.  Try just 'modprobe dahdi_echocan_oslec' and see what errors, if any, show up when running dmesg.

By: Reporter (mancy) 2010-09-30 23:16:46

sruffell:
modprobe dahdi_echocan_oslec
FATAL: Module dahdi_echocan_oslec not found.

that's strange, because DAHDI 2.4 claim that no need to configure all package should have been correctly compiled from one source.

By: Shaun Ruffell (sruffell) 2010-09-30 23:30:42

Starting at line 184 in the README [1] is a description on how to build OSLEC.  You need to go through some extra steps if you want to use it since it cannot be distributed along with the other DAHDI source currently.

[1]
http://svn.asterisk.org/view/dahdi/linux/trunk/README?revision=9308&view=markup

By: Reporter (mancy) 2010-10-01 05:54:01

sruffell, Oh.. thank you for your fast responses .
i'll go through the steps

By: Shaun Ruffell (sruffell) 2012-01-09 09:29:36.734-0600

I'll go ahead and close this out. Feel free to reopen if it's not resolved for you.

By: Mc GRATH Ricardo (mcgrathr) 2013-10-19 17:39:02.072-0500

As these  issue is already closed, but if could help about my experiences  and how it seems could be solved.

I have installed TE122 E1 card configured for E1 MFCR2 mode, with  Elastix-2.4.0-RC2-i386-bin-12Dec2012.
When system start up the following message error "DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument (22)"
By searching with google engine I found similar case with many recommendation, I have tried without solved, so I have tried by my self and found problem it becomes from transcription of the following line on System.conf ;

echocanceller=oslec - inactive,1-15
echocanceller=oslec - inactive,17-31

if changed to the following problem it solved

echocanceller=oslec - inactive 1-15
echocanceller=oslec - inactive 17-31