[asterisk-bugs] [DAHDI-linux 0014577]: FXO channels "hookstate" incorrect on startup
Asterisk Bug Tracker
noreply at bugs.digium.com
Sun Mar 1 17:06:49 CST 2009
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14577
======================================================================
Reported By: jkroon
Assigned To:
======================================================================
Project: DAHDI-linux
Issue ID: 14577
Category: dahdi (the module)
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2009-03-01 16:16 CST
Last Modified: 2009-03-01 17:06 CST
======================================================================
Summary: 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.
======================================================================
----------------------------------------------------------------------
(0100961) jkroon (reporter) - 2009-03-01 17:06
http://bugs.digium.com/view.php?id=14577#c100961
----------------------------------------------------------------------
Some further investigation shows that tzafrir is indeed 100 % correct. The
wctdm24xxp module (and supposedly the others too) directly after
initializing detects battery on the connected lines, and subsequently
signals offhook to dahdi.
Some time after this dahdi_cfg gets run and at line 3992 of
drivers/dahdi/dahdi-base.c this line exists:
chans[ch.chan]->rxhooksig = DAHDI_RXSIG_INITIAL;
For a test (since I only have FXO modules in this particular machine) I
changed this line to DAHDI_RXSIG_OFFHOOK, which afaik should end up not
changing the state at all. My concern here is that this state may be
incorrect anyway as there may not be battery on the line and how it's being
forced that way. So perhaps it's better to just leave this line out
entirely (but that may again have other consequences).
If this line is indeed required then something like the following may be
more appropriate?
switch (chans[ch.chan]->sig) {
case DAHDI_SIG_FXSKS:
case DAHDI_SIG_FXSGS:
chans[ch.chan]->rxhooksig = DAHDI_RXSIG_OFFHOOK;
break;
default:
chans[ch.chan]->rxhooksig = DAHDI_RXSIG_INITIAL;
}
Alternatively, just don't touch rxhooksig for FXSKS and FXSGS signalling?
Please advise on the correct course of action.
Issue History
Date Modified Username Field Change
======================================================================
2009-03-01 17:06 jkroon Note Added: 0100961
======================================================================
More information about the asterisk-bugs
mailing list