[asterisk-bugs] [Zaptel 0008290]: [patch] zap hookstate is never set offhook if wctdm module is loaded with an active fxo line
noreply at bugs.digium.com
noreply at bugs.digium.com
Mon Dec 3 09:20:00 CST 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=8290
======================================================================
Reported By: tmarkov
Assigned To: mattf
======================================================================
Project: Zaptel
Issue ID: 8290
Category: wctdm
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Zaptel Version: 1.2.10
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: Yes
Request Review:
======================================================================
Date Submitted: 11-03-2006 17:28 CST
Last Modified: 12-03-2007 09:20 CST
======================================================================
Summary: [patch] zap hookstate is never set offhook if wctdm
module is loaded with an active fxo line
Description:
If #define ZAP_CHECK_HOOKSTATE is uncommented in chan_zap.c, then the
hookstate stays onhook if the wctdm module is loaded with an active line.
Removing line and reinserting will cause the hookstate to initialize
properly. The problem appears to be that wc->mod[card].fxo.battery never
gets initialized to 0, so in wctdm_voicedaa_check_hook() the test "if
(!wc->mod[card].fxo.battery && !wc->mod[card].fxo.battdebounce)" is never
entered, and the hookstate remains onhook upon module startup. Only a
cycling of line voltage will correct the problem. I have attached a patch
which initializes the battery variable and fixes the problem for me.
======================================================================
----------------------------------------------------------------------
meneault - 12-03-07 09:20
----------------------------------------------------------------------
Hi flefoll, I think I must apologize... Effectively I made a mistake.
When I made the patch 1 month ago, it was supposed to correct 2 issues see
my message on October the 22. I could only test the first one... and I
forgot to mention that the second issue was not tested. I put the patched
version on my box to be sure it wouldn't cause any trouble in the driver
but actually the patch was no use for me (my asterisk does not check for
zaptel before attempting a call).
I was waiting for feedbacks but I didn't get any (silence means agreement
:) ) so I supposed it ran well, and I forgot about the issue.
Now thanks to you (actually your are the only feedback of the patch) I
know that the second part of my patch do not correct the second issue.
Now that I clarified everything lets get back to the issue.
About the define AUDIO_RINGCHECK it has got an impact on the first issue
("BATTERY" message printed out), if you compile with it enabled you
theoretically don't need the first part of my patch
(wctdm-race-1.4-rev3211).
This is due to pure accident only (it hides the race).
About ZERO_BATT_RING and JAPAN as I previously mentioned you can forget
about them because it will not compile if you enable them (not tested but I
am quite confident). I think this code should be removed to improve
readability.
And about zt_hooksig being called, it wouldn't be called in my box neither
(sorry again :( ). But thanks to your traces and your feedback now I am
ready to correct that.
So I will upload wctdm-hooksig2-1.4-rev3121 (please apply
wctdm-race-1.4-rev3211 too).
This time I'll test it too (at least to be sure that zt_hooksig is
called).
Issue History
Date Modified Username Field Change
======================================================================
12-03-07 09:20 meneault Note Added: 0074677
======================================================================
More information about the asterisk-bugs
mailing list