[Home]

Summary:ASTERISK-15764: alarm state not properly maintained on analog channels
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2010-03-08 06:54:56.000-0600Date Closed:2010-09-20 18:18:43
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The DAHDI_ALARM and DAHDI_NOALARM events update inalarm in the pvt_analog rather than the one in the generic chan_dahdi one. However the generic chan_dahdi one is used in at least two places:

1. available() - checked before calling the tech-specific available()
2. 'dahdi hsow channel NN' - the line 'InAlarm:'


After 'dahdi restart'

(Logging: verbose 4, debug 2)


morgan*CLI> dahdi show channel 19
...
InAlarm: 0
...


(Unplugging cable)
[Mar  8 14:34:53] DEBUG[2123]: chan_dahdi.c:10756 do_monitor: Monitor doohicky got event Alarm on channel 19
[Mar  8 14:34:53] DEBUG[2123]: sig_analog.c:3257 analog_handle_init_event: channel (19) - signaling (5) - event (ANALOG_EVENT_ALARM)
[Mar  8 14:34:53] WARNING[2123]: chan_dahdi.c:6955 handle_alarms: Detected alarm on channel 19: Red Alarm

morgan*CLI> dahdi show channel 19
...
InAlarm: 0
...

(Plugging cable back)

[Mar  8 14:37:48] DEBUG[2123]: chan_dahdi.c:10756 do_monitor: Monitor doohicky got event No more alarm on channel 19
[Mar  8 14:37:48] DEBUG[2123]: sig_analog.c:3257 analog_handle_init_event: channel (19) - signaling (5) - event (ANALOG_EVENT_NOALARM)
[Mar  8 14:37:48] NOTICE[2123]: sig_analog.c:3364 analog_handle_init_event: Alarm cleared on channel 19

morgan*CLI> dahdi show channel 19
...
InAlarm: 0
...

Now let's try to call through that channel:

morgan*CLI> originate DAHDI/19/600 application Echo
[Mar  8 14:42:43] NOTICE[2119]: channel.c:4402 __ast_request_and_dial: Unable to request channel DAHDI/18/600

[Mar  8 14:45:13] DEBUG[2119]: sig_analog.c:656 analog_available: analog_available 19
[Mar  8 14:45:13] NOTICE[2119]: channel.c:4402 __ast_request_and_dial: Unable to request channel DAHDI/19/600

Now let's take a different port. which has not been plugged at 'dahdi restart' time:

morgan*CLI> dahdi show channel 18
...
InAlarm: 1
...

(Plug in)
[Mar  8 14:41:32] DEBUG[2123]: chan_dahdi.c:10756 do_monitor: Monitor doohicky got event No more alarm on channel 18
[Mar  8 14:41:32] DEBUG[2123]: sig_analog.c:3257 analog_handle_init_event: channel (18) - signaling (5) - event (ANALOG_EVENT_NOALARM)
[Mar  8 14:41:32] NOTICE[2123]: sig_analog.c:3364 analog_handle_init_event: Alarm cleared on channel 18

morgan*CLI> dahdi show channel 18
...
InAlarm: 1
...


Now let's try to call through that channel:

morgan*CLI> originate DAHDI/18/600 application Echo
[Mar  8 14:42:43] NOTICE[2119]: channel.c:4402 __ast_request_and_dial: Unable to request channel DAHDI/18/600
Comments:By: Leif Madsen (lmadsen) 2010-03-08 10:14:33.000-0600

Thanks for the report!

By: Richard Mudgett (rmudgett) 2010-09-20 17:58:39

r261007 | rmudgett | 2010-05-04 16:10:58 -0500 (Tue, 04 May 2010) | 8 lines
Changed paths:
  M /trunk/channels/chan_dahdi.c
  M /trunk/channels/sig_analog.c
  M /trunk/channels/sig_analog.h
  M /trunk/channels/sig_pri.c
  M /trunk/channels/sig_pri.h

The inalarm flag is not passed up from the sig_analog and sig_pri submodules.

The CLI "dahdi show channel" command was not correctly reporting the
InAlarm status.

The inalarm flag is now consistently passed between chan_dahdi and
submodules.

By: Digium Subversion (svnbot) 2010-09-20 18:14:43

Repository: asterisk
Revision: 287683

U   branches/1.8/channels/chan_dahdi.c

------------------------------------------------------------------------
r287683 | rmudgett | 2010-09-20 18:14:43 -0500 (Mon, 20 Sep 2010) | 9 lines

The inalarm flag was not set in sig_analog struct if the port is initially in alarm.

Fixed initial inalarm value for sig_analog ports.

Along with -r261007, this gets the inalarm flag in sync with chan_dahdi
for sig_analog ports.

(closes issue ASTERISK-15764)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=287683

By: Digium Subversion (svnbot) 2010-09-20 18:18:43

Repository: asterisk
Revision: 287693

_U  trunk/
U   trunk/channels/chan_dahdi.c

------------------------------------------------------------------------
r287693 | rmudgett | 2010-09-20 18:18:42 -0500 (Mon, 20 Sep 2010) | 16 lines

Merged revisions 287683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r287683 | rmudgett | 2010-09-20 18:14:42 -0500 (Mon, 20 Sep 2010) | 9 lines
 
 The inalarm flag was not set in sig_analog struct if the port is initially in alarm.
 
 Fixed initial inalarm value for sig_analog ports.
 
 Along with -r261007, this gets the inalarm flag in sync with chan_dahdi
 for sig_analog ports.
 
 (closes issue ASTERISK-15764)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=287693