[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
Fri Jan 11 16:45:16 CST 2008


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:              01-11-2008 16:45 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.
====================================================================== 

---------------------------------------------------------------------- 
 kpfleming - 01-11-08 16:45  
---------------------------------------------------------------------- 
I'd like you all to determine what parts (if any) of these patches still
need to be applied, as we just added channel-level alarms to Zaptel 1.4 and
chan_zap, so it is now possible for chan_zap to know that it cannot dial on
an FXO port when battery is not present (without needing to use special
hook state checking to accomplish it). At this time I still believe that
the wctdm and wctdm24xxp drivers do not *raise* alarms when they notice
battery loss, but if you can factor out the battery-alarm portions of this
work and use zt_alarm_channel() to indicate and clear alarms on the
relevant channels, that would allow me to finish up this issue and resolve
it.

Thanks for all your hard work! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-11-08 16:45  kpfleming      Note Added: 0076761                          
======================================================================




More information about the asterisk-bugs mailing list