[asterisk-bugs] [Asterisk 0014163]: [patch] UK (BT) lines produce uncleared red alarm on TDM400P during line tests

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 26 08:26:24 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14163 
====================================================================== 
Reported By:                jedi98
Assigned To:                sruffell
====================================================================== 
Project:                    Asterisk
Issue ID:                   14163
Category:                   Channels/chan_dahdi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for review
Asterisk Version:           1.4.22 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-02 10:29 CST
Last Modified:              2009-10-26 08:26 CDT
====================================================================== 
Summary:                    [patch] UK (BT) lines produce uncleared red alarm on
TDM400P during line tests
Description: 
Asterisk: 1.4.22, dahdi-linux: 2.1.0.3

The automatic overnight line tests (or manual ones) used on UK (BT) lines
causes a red alarm on a dahdi / TDM400P connected channel. This is because
the line uses voltage tests (battery loss) and polarity reversal. The
polarity reversal causes chan_dahdi to initiate v23 CallerID processing but
during this the event DAHDI_EVENT_NOALARM is ignored so that the alarm is
never cleared.

All this means that the channel is unusable until a "dahdi restart"
occurs.

I have a patch for chan_dahdi which works well for me but it's not the
nicest solution an it needs more people to test / refine. I will attach the
patch.

Syslog: -
Dec 29 22:09:56 39net-server2 kernel: NO BATTERY on 1/3!
Dec 29 22:09:58 39net-server2 kernel: 436822404 Polarity reversed (-1 ->
1)
Dec 29 22:09:58 39net-server2 kernel: BATTERY on 1/3 (+)!
Dec 29 22:10:00 39net-server2 kernel: NO BATTERY on 1/3!
Dec 29 22:10:02 39net-server2 kernel: 436823620 Polarity reversed (1 ->
-1)
Dec 29 22:10:03 39net-server2 kernel: BATTERY on 1/3 (-)!
Dec 29 22:10:05 39net-server2 kernel: NO BATTERY on 1/3!
Dec 29 22:10:05 39net-server2 kernel: 436824308 Polarity reversed (-1 ->
1)
Dec 29 22:10:07 39net-server2 kernel: BATTERY on 1/3 (-)!
Dec 29 22:10:07 39net-server2 kernel: 436824688 Polarity reversed (1 ->
-1)

Asterisk log: -
[Dec 29 22:09:57] WARNING[10309]: chan_dahdi.c:3784 handle_alarms:
Detected alarm on channel 3: Red Alarm
  == Starting post polarity CID detection on channel 3
    -- Starting simple switch on 'DAHDI/3-1'
[Dec 29 22:09:59] NOTICE[10332]: chan_dahdi.c:6319 ss_thread: Got event 5
(No more alarm)...
[Dec 29 22:10:01] WARNING[10332]: chan_dahdi.c:6380 ss_thread: CID timed
out waiting for ring. Exiting simple switch
    -- Hungup 'DAHDI/3-1'
[Dec 29 22:10:01] WARNING[10309]: chan_dahdi.c:3784 handle_alarms:
Detected alarm on channel 3: Red Alarm
  == Starting post polarity CID detection on channel 3
    -- Starting simple switch on 'DAHDI/3-1'
[Dec 29 22:10:03] NOTICE[10333]: chan_dahdi.c:6319 ss_thread: Got event 5
(No more alarm)...
[Dec 29 22:10:06] WARNING[10333]: chan_dahdi.c:6380 ss_thread: CID timed
out waiting for ring. Exiting simple switch
    -- Hungup 'DAHDI/3-1'
[Dec 29 22:10:06] WARNING[10309]: chan_dahdi.c:3784 handle_alarms:
Detected alarm on channel 3: Red Alarm
  == Starting post polarity CID detection on channel 3
    -- Starting simple switch on 'DAHDI/3-1'
[Dec 29 22:10:08] NOTICE[10334]: chan_dahdi.c:6319 ss_thread: Got event 5
(No more alarm)...
[Dec 29 22:10:10] WARNING[10334]: chan_dahdi.c:6380 ss_thread: CID timed
out waiting for ring. Exiting simple switch

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

---------------------------------------------------------------------- 
 (0112704) Chainsaw (reporter) - 2009-10-26 08:26
 https://issues.asterisk.org/view.php?id=14163#c112704 
---------------------------------------------------------------------- 
Still an issue on Asterisk 1.6.1.6 with DAHDI 2.2.0.2; log entries during
line test:
[Oct 25 22:25:28] NOTICE[23965] chan_dahdi.c: Got event 4 (Alarm)...
[Oct 25 22:25:29] NOTICE[23965] chan_dahdi.c: Alarm cleared on channel 1
[Oct 25 22:25:30] WARNING[23965] chan_dahdi.c: Detected alarm on channel
1: Red Alarm
[Oct 25 22:25:30] WARNING[23965] chan_dahdi.c: Hangup received waiting for
ring. Exiting simple switch
[Oct 25 22:25:32] NOTICE[24073] chan_dahdi.c: Got event 17 (Polarity
Reversal)...
[Oct 25 22:25:34] WARNING[24073] chan_dahdi.c: CID timed out waiting for
ring. Exiting simple switch
[Oct 25 22:25:35] NOTICE[24128] chan_dahdi.c: Got event 5 (No more
alarm)...
[Oct 25 22:25:37] WARNING[24128] chan_dahdi.c: CID timed out waiting for
ring. Exiting simple switch

Any call afterwards:
[Oct 26 10:30:44] NOTICE[19973] chan_dahdi.c: Got event 2
(Ring/Answered)...
[Oct 26 10:30:46] WARNING[19973] chan_dahdi.c: CID timed out waiting for
ring. Exiting simple switch
[Oct 26 10:31:10] WARNING[20263] chan_dahdi.c: CID timed out waiting for
ring. Exiting simple switch

The channel remains wedged until a DAHDI restart. I have forward-ported
the attached patch so it applies cleanly. Please consider applying it as it
is still required for production running in the United Kingdom. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-26 08:26 Chainsaw       Note Added: 0112704                          
======================================================================




More information about the asterisk-bugs mailing list