Summary: | DAHLIN-00246: WCTDM, HWEC set as echo canceller when no HWEC present, doesn't register SWEC | ||
Reporter: | Michael L. Young (elguero) | Labels: | |
Date Opened: | 2011-07-19 22:17:21 | Date Closed: | 2011-07-21 11:29:34 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 0001-dahdi-Drivers-that-do-not-support-hwec-should-not-re.patch ( 1) 0001-dahdi-Drivers-that-do-not-support-hwec-should-not-re.patch | |
Description: | This was discovered due to echo on the line after updating drivers, which was not present before. When trying to dial out through Asterisk, the following warning was displayed on the console: [Jul 19 23:09:39] WARNING[32741]: chan_dahdi.c:4870 dahdi_enable_ec: Unable to enable echo cancellation on channel 4 (No such device) Current code shows the following in dmesg upon loading: dahdi: Telephony Interface Registered on major 196 dahdi: Version: SVN-trunk-r10047 Freshmaker version: 73 Freshmaker passed register test Module 0: Installed -- AUTO FXS/DPO Module 1: Not installed Module 2: Not installed Module 3: Installed -- AUTO FXO (FCC mode) Found a Wildcard TDM: Wildcard TDM400P REV I (2 modules) -- Setting echo registers: -- Set echo registers successfully In Asterisk: dahdi show version -> DAHDI Version: SVN-trunk-r10047 Echo Canceller: HWEC By changing hwec_overrides_swec to 0 in drivers/dahdi/dahdi-base.c, I get the following in dmesg: dahdi: Telephony Interface Registered on major 196 dahdi: Version: SVN-trunk-r10047M Freshmaker version: 73 Freshmaker passed register test Module 0: Installed -- AUTO FXS/DPO Module 1: Not installed Module 2: Not installed Module 3: Installed -- AUTO FXO (FCC mode) Found a Wildcard TDM: Wildcard TDM400P REV I (2 modules) dahdi_echocan_mg2: Registered echo canceler 'MG2' -- Setting echo registers: -- Set echo registers successfully In Asterisk: dahdi show version -> DAHDI Version: SVN-trunk-r10047M Echo Canceller: HWEC, MG2 /etc/dahdi/system.conf: fxoks=1 fxsks=4 echocanceller=mg2,1 echocanceller=mg2,4 It appears that the problem is that HWEC is being registered as an echo canceller even though the board does not have one installed. Since HWEC is set, MG2 is therefore not registered and ignored. | ||
Comments: | By: Shaun Ruffell (sruffell) 2011-07-20 10:20:32.616-0500 I've attached 0001-dahdi-Drivers-that-do-not-support-hwec-should-not-re.patch which I believe should resolve the problem. Also, when you changed hwec_overrides_swec to 0, I believe then you should have had swec properly enabled on the channel. You can see what is actually attached to the channel by looking /proc/dahdi/1. Asterisk will always now show HWEC, since the generic HWEC factory is always available in the core of DAHDI (just it will not be able to attach to some channels) If the patch works for you, do you mind providing your email address so I can add it into the patch? By: Shaun Ruffell (sruffell) 2011-07-20 10:22:44.132-0500 BTW: You can apply that patch to a working copy directly like: wget "https://issues.asterisk.org/jira/secure/attachment/40720/0001-dahdi-Drivers-that-do-not-support-hwec-should-not-re.patch" -O - | patch -p1 By: Michael L. Young (elguero) 2011-07-20 10:45:50.348-0500 You are correct. When I changed hwec_overrides_swec to 0, swec was enabled on the channel. I did that for troubleshooting purposes. That is good to know that HWEC will always be shown now. I was thrown off by it being displayed on a board without a physical hwec. I guess I never picked up on it before. The patch worked. I do see the swec being registered and attached to the channels now. Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) 1 WCTDM/4/0 FXOKS (In use) (EC: MG2 - INACTIVE) 2 WCTDM/4/1 Reserved 3 WCTDM/4/2 Reserved 4 WCTDM/4/3 FXSKS (In use) (EC: MG2 - INACTIVE) My email is elgueromexicano at gmail.com Thanks By: Shaun Ruffell (sruffell) 2011-07-20 12:21:44.857-0500 Tzafrir had some comments on the patch, so I've attached a new one. Should be able to apply this one directly on your test machine via: {code} wget "https://issues.asterisk.org/jira/secure/attachment/40724/0001-dahdi-Drivers-that-do-not-support-hwec-should-not-re.patch" -O - | patch -p1 {code} By: Michael L. Young (elguero) 2011-07-20 20:25:13.976-0500 I can confirm that the latest patch works on my test machine. By: Shaun Ruffell (sruffell) 2011-07-21 11:29:34.458-0500 Patch committed to trunk in [r10070|http://svnview.digium.com/svn/dahdi?view=revision&revision=10070] and will be in the 2.5.0-rc2 tag (and 2.5.0 release) Thanks for the report / test. |