[asterisk-bugs] [Asterisk 0014577]: [patch] FXO channels "hookstate" incorrect on startup

Asterisk Bug Tracker noreply at bugs.digium.com
Wed May 20 15:34:55 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14577 
====================================================================== 
Reported By:                jkroon
Assigned To:                sruffell
====================================================================== 
Project:                    Asterisk
Issue ID:                   14577
Category:                   Channels/chan_dahdi
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.6.0.6 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-01 16:16 CST
Last Modified:              2009-05-20 15:34 CDT
====================================================================== 
Summary:                    [patch] FXO channels "hookstate" incorrect on
startup
Description: 
Referencing bug 13786 (http://bugs.digium.com/view.php?id=13786) which
attempts to work around an underlying problem in userspace (chan_dahdi). 
The issue seems to be (as described by tzafrir):

It seems to expose a bug(?) in zaptel/dahdi where chan->rxhooksig is set
to RX_HOOKSIG_INITIAL at the end of chanconfig() which leaves the channel's
state there "uninitialized" and even if the channel driver knows better it
cannot override this decision. But I'm not sure what's the intended
behaviour, so I avoid a seperate bug report on that for now.

This is manifested in that I cannot make outbound calls on an FXO card
(Using FXSKS signalling) until I've received an incoming call resetting the
hookstate to offhook (A single ring is good enough), or alternatively,
disconnecting and reconnecting the telephone line.
====================================================================== 

---------------------------------------------------------------------- 
 (0105153) sruffell (administrator) - 2009-05-20 15:34
 https://issues.asterisk.org/view.php?id=14577#c105153 
---------------------------------------------------------------------- 
As tzafrir indicated in issue https://issues.asterisk.org/view.php?id=13786, the
root cause does appear to be that
the DAHDI_CHANCONFIG ioctl sets the rxhooksig back to DAHDI_RXSIG_INITIAL,
and I too am unsure what the original purpose for that is and what other
side effects may be if removed.

0001-dahdi-base-Do-not-overwrite-the-hookstate-at-channe.patch just
removes that line which appears to work fine in the limited testing I've
done in the lab with a TDM800P card.

I've also attached
0001-wctdm24xxp-Detect-if-our-hookstate-has-been-set-bac.patch, which is
only against the wctdm24xxp driver.  This has the wctdm24xxp driver forget
what it thinks the current battery state if it detects that the rxhooksig
has been set to DAHDI_RXSIG_INITIAL.  This allows it to re-report to dahdi
what the true rxhooksig state is.

While I would like to see the fix go into dahdi-base.c, the change to the
wctdm24xxp driver is less risky since it isn't clear to me who depends on
the rxhooksig to be in the initial state. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-20 15:34 sruffell       Note Added: 0105153                          
======================================================================




More information about the asterisk-bugs mailing list