I’m trying to set up a system based on Asterisk 1.6.1.1 and DAHDI 2.2.0. Try as I might, I just can’t seem to find the right combination of echo canceller settings. I am using a TDM410 with a single FXO port.
I have a second Asterisk machine here which uses a TDM400 card and the old Zaptel drivers. Simply setting ‘echocancel=yes’ and ‘echotraining=yes’ in zapata.conf was sufficient to get no discernable echo on my BT line (in the UK).
Using exactly the same line and wiring, I should reasonably expect to be able to get the performance of my newer DAHDI based system to match, am I right? Problem is - it doesn’t. There is considerably more echo on the DAHDI system than on the Zaptel one.
I have run fxotune and it’s spat out “4=5,0,0,0,0,0,0,0,0”.
I have tried the MG2, KB1 and SEC2 echo cancellers. At the moment I’ve got the best results I can with the KB1 canceller and the following settings in chan_dahdi.conf:
Does anyone know what the equivalent settings are in the various DAHDI options to cause the echo canceller to behave as the default on in the Zaptel drivers?
And has anyone had any eureka moments and can post a ‘magic’ set of settings that actually cancels the echo?
Would a hardware echo canceller be that much better? Seeing as I don’t have one on my Zaptel system I don’t really see why I should need to pay for one on the DAHDI system.
I’ve got basically the same setup as you. Never could get good results with any of the available echo cancelers in DAHDI. The Oslec echo canceler was added to the Linux kernel’s driver staging area in 2.6.29 so I made the switch to that. Much happier now.
Well, I think I’ve answered my own question there. Even during a call my CPU isn’t more than about 4% utilised, so it looks like there’s plenty of cycles left.
I’ve measured the echo time I am experiencing and it is 157ms. Seeing as this is longer than even the hardware echo canceller deals with (128ms), is this actually a different problem? Perhaps that’s why I’m not having much luck with the echo cancellers.
Has anyone seen this sort of level of echo before?
Glad it’s working better for you. I don’t know about tweaking it, it just worked for me. There’s an OSLEC mailing list that might give you some info on how to make adjustments to it. You can view the archives here:
Thanks for the link, I’ve been having a read around the subject and it seems it’s unlikely that OSLEC is really helping me that much, as I can’t see any mention of it working past 40ms.
Having tried to use my system to make a call just now, the level of echo is still not acceptable, actually it’s very hard to talk.
Seeing as OSLEC has been widely reported to work well, I really do wonder if I have a faulty FXO module that’s generating much more echo than it should.
I have a ticket open with Digium (who’ve yet to reply…) so we will see what happens. I may end up returning the TDM410 for a replacement.
You mentioned that you have a TDM400 card that is working well. Can you take the FXO module from the TDM400 and install it on the TDM410 to see if that’s really your problem? Are they compatible? The TDM410 is the only Digium card I’ve ever had but I was under the impression the FXO and FXS modules were the same. You might want to check on that.
I know, I hate touching a working system. Last week I built a mini-ITX system with a dual-core Intel Atom processor just to run my Asterisk stuff at home. Everything went well but when I got everything back up, caller ID was failing and I was getting odd messages about “polarity reversal” on the console. Turned out to be a problem with my phone jack but my first thought was “here we go again.”
I ended up sending a support request to Digium. They took a couple of days to reply but were quite thorough. They have given me a HPEC license to use.
Before I had a chance to configure HPEC, I had a mini epiphany… using OSLEC, I was getting awful results with echocancel=yes (i.e. 128, 16ms). The echo sounded like it wasn’t being cancelled at all. I had then tried echocancel=256 (32ms), which made the echo sound like it was all underwater. I had abandoned further attempts. UNTIL… It occurred to me that perhaps the watery sound was OSLEC half-cancelling the echo. None of the documentation I’ve found says you can set echocancel=512 (64ms) with OSLEC, but I did and presto, the echo is virtually gone! I occasionally hear a noise or two when OSLEC is training, but it quickly disappears.
So, finally, I’m happy with the result. If only I’d thought to try a longer tap length earlier in my investigations… but then that’s what investigations are for.
That’s good stuff to know. Glad its working for you. I also went through the process of getting an HPEC license but decided not to use it because of all the hassle involved in installing it. I’ll be sticking with OSLEC.