[asterisk-bugs] [DAHDI-linux 0014577]: FXO channels "hookstate" incorrect on startup

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Mar 1 22:59:57 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 22:59 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0100968) jkroon (reporter) - 2009-03-01 22:59
 http://bugs.digium.com/view.php?id=14577#c100968 
---------------------------------------------------------------------- 
That's a valid point.  Specifically if I'm not mistaken it's a RED alarm in
this particular case.

Ok, so you're suggesting to rip out the if/else ladder in
channel/chan_dahdi.c (leading up to line 7840) and replacing with a single
return, eg:

    if (par.rxbits > -1)
        return 1;
    if (par.rxisoffhook)
        return 1;
    else
        return 0;

becomes

    return 1;

?

I can easily cook up a patch but since I haven't signed any code
disclaimers nothing with Digium me doing so might well delay the process. 
I can (and don't mind to) go through the process but that would waste time
imho and the patch is trivial. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-01 22:59 jkroon         Note Added: 0100968                          
======================================================================




More information about the asterisk-bugs mailing list