[asterisk-bugs] [Asterisk 0012453]: [patch] British Telecom line testing causes segfault on chan_zap.c

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Jun 4 08:51:05 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12453 
====================================================================== 
Reported By:                Alex728
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   12453
Category:                   Channels/chan_zap
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-15-2008 19:39 CDT
Last Modified:              06-04-2008 08:51 CDT
====================================================================== 
Summary:                    [patch] British Telecom line testing causes segfault
on chan_zap.c
Description: 
Telephone lines in the UK are subjected to various automatic line tests in
the evening. These include a polarity reversal, and alternate application
of earth and battery (-48V) to the A and B wires (Tip and ring) 

Since version 1.4.18 of Asterisk, these conditions are detected first as a
spurious zaptel alarm, then a polarity reversal before caller ID. For some
reason this causes chan_zap.c to crash with a segmentation fault.

====================================================================== 

---------------------------------------------------------------------- 
 Alex728 - 06-04-08 08:51  
---------------------------------------------------------------------- 
since reporting this, I followed what stever28 did (upgrade to Zaptel
1.4.10) and have monitored the system for a few weeks. What I now get is
this

[May 31 05:29:42] NOTICE[16447] chan_zap.c: Got event 17 (Polarity
Reversal)...
[May 31 05:29:44] DEBUG[16447] chan_zap.c: Ignoring Polarity switch to
IDLE on channel 1, state 9
[May 31 05:29:44] DEBUG[16447] chan_zap.c: Polarity Reversal event occured
- DEBUG 2: channel 1, state 9, pol= 0, aonp= 0, honp= 0, pdelay= 600, tv=
1027406534
[May 31 05:29:44] DEBUG[16447] chan_zap.c: Ignore switch to REVERSED
Polarity on channel 1, state 9
[May 31 05:29:44] DEBUG[16447] chan_zap.c: Ignoring Polarity switch to
IDLE on channel 1, state 9
[May 31 05:29:44] DEBUG[16447] chan_zap.c: Polarity Reversal event occured
- DEBUG 2: channel 1, state 9, pol= 0, aonp= 0, honp= 0, pdelay= 600, tv=
1027407319
[May 31 05:29:46] WARNING[16447] chan_zap.c: CID timed out waiting for
ring. Exiting simple switch

which is more like what I would expect to see Zaptel picking up on a BT
line test. Certainly it does not segfault any more which is clearly a good
thing!

At the moment applying the patch is risky as I've only got one machine to
play with (currently in live test) and the zaptel upgrade has "cured" the
problem. I could however test it in a couple of months time when I have
moved the rest of users onto a full production machine and have more
testing resources. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-04-08 08:51  Alex728        Note Added: 0087788                          
======================================================================




More information about the asterisk-bugs mailing list