[asterisk-dev] 13786: fxo ks dialout hookstate check

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Nov 17 01:29:11 CST 2008


It seems that as of 1.4.22 (partially) and 1.6.0 the behaviour of
chan_zap / chan_dahdi on FXO dialout has changed. 

chan_zap.c had an optional test in available(), used only in the case 
of an FXO port with [FXS] KS signalling that declares the Zaptel channel
available only if it is not already off-hook. This test has been
disabled by default and only enabled if the user defines

See http://svn.digium.com/svn/asterisk/tags/1.4.21/channels/chan_zap.c

I'm not sure exactly why Zaptel needs to keep the state here (rather
than Asterisk). But it seems that this feature has been disabled by
default for a reason. Not for the overhead (the extra system call is
used either way). Later on when checking how this is implemented in
Zaptel, I see that the value of chan->rxhooksig is reset at the very end
of the chanconfig function to RX_HOOKSIG_INITIAL, which means that even
if a driver wants to set it before registration or at chanconfig, it
cannot do that.

In asterisk 1.4.22, this test has been enabled by default in some cases
accidentally, as pointed out in http://bugs.digium.com/view.php?id=13786 .
In 1.6.0, however, the #define is gone, and the buggy hookstate check is
enabled by default. Any idea why?

               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir

More information about the asterisk-dev mailing list