[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
Wed Jan 16 07:36:17 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=8290 
====================================================================== 
Reported By:                tmarkov
Assigned To:                kpfleming
====================================================================== 
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-16-2008 07:36 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 - 01-16-08 07:36  
---------------------------------------------------------------------- 
As requested here is the list of patches to keep/remove:

- From my patches you may remove all the patches I uploaded except the
last one (8290-alarm-total_1_4_rev3696) i.e.:

REMOVE:
 wctdm-race-1.4-rev3211 
 wctdm-hooksig-1.4-rev3211 
 wctdm24xxp_base-c-race_patch_1_4_rev3121 
 wctdm24xxp_base-c-hooksig_patch_1_4_rev3121 
 wctdm-hooksig2-1.4-rev3121
 8290-race-wctdm-c_1_4_rev3474
 8290-msg-wctdm-c_1_4_rev3474
 8290-hooksig-wctdm-c_1_4_rev3474
 8290-hooksig-zaptel-h_1_4_rev3474
 8290-hooksig-zaptel-base-c_1_4_rev3474
 8290-alarm-wctdm-c_1_4_rev3682
 8290-alarm-wctdm24xxp-base-c_1_4_rev3682
 8290-alarm-zaptel-base-c_1_4_rev3682

KEEP:
 8290-alarm-total_1_4_rev3696


NOTE:
I don't want to take the responsibility on deleting patches/traces which I
didn't make but here is my opinion if you need it:

- keep the first two patches, that were made for 1.2 in case someone wants
it to be fixed for 1.2 since our patches won't apply to 1.2. i.e:
KEEP
 wctdm-patch-1.2.10 
 zaptel-patch-1.2.10
 

- About flefoll patches, you should probably ask him before, but my
opinion is that you can remove everything except his last two. i.e:

REMOVE:
 flf_zaptel-base.c-1.4.6-debugonly
 flf_wctdm.c-1.4.6-debugonly 
 flf_MPATCH_alone.log 
 flf_MPATCH_and_FPATCH.log 
 flf_FPATCH_alone.log 
 flf_zaptel-base.c-1.4.7-debugonly 
 flf_wctdm.c-1.4.7-debugonly 
 flf_wctdm24xxp_base.c-1.4.7-debugonly 
 flf_wctdm.c-1.4.7-debugonly-checkbatt
 
KEEP:
 flf-chan_zap.c.1.4.17.patch-get_alarms
 flf-zaptel-1.4.8-patch-initial-fxo-state

NOTE:
be aware that removing patches and traces may hide some details of this
bug though (for the ones wanting to follow the bug from scratch). 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-16-08 07:36  meneault       Note Added: 0080755                          
======================================================================




More information about the asterisk-bugs mailing list