aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sig_analog.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-03 19:06:06 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-03 19:06:06 +0000
commitde908247c7bc23609c3020a71c4733d1192299d9 (patch)
tree237b67b20a4b97a537130e315b723caef7b7c0a9 /channels/sig_analog.c
parenta5ea1fa274e5a6bf53136e1bc99e3a025a8f45cf (diff)
Merged revisions 250480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r250480 | jpeeler | 2010-03-03 13:04:11 -0600 (Wed, 03 Mar 2010) | 15 lines Make sure to clear red alarm after polarity reversal. From the issue: 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. (closes issue #14163) Reported by: jedi98 Patches: chan_dahdi-1.4-inalarm.diff uploaded by jedi98 (license 653) Tested by: mattbrown, Chainsaw, mikeeccleston ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250481 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sig_analog.c')
-rw-r--r--channels/sig_analog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index 9542bacec..3e8e9f317 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -2161,6 +2161,9 @@ static void *__analog_ss_thread(void *data)
}
if (res == 1) {
+ if (ev == ANALOG_EVENT_NOALARM) {
+ p->inalarm = 0;
+ }
if (p->cid_signalling == CID_SIG_V23_JP) {
if (ev == ANALOG_EVENT_RINGBEGIN) {
analog_off_hook(p);
@@ -2249,7 +2252,9 @@ static void *__analog_ss_thread(void *data)
}
if (res == 1 || res == 2) {
- if (ev == ANALOG_EVENT_POLARITY && p->hanguponpolarityswitch && p->polarity == POLARITY_REV) {
+ if (ev == ANALOG_EVENT_NOALARM) {
+ p->inalarm = 0;
+ } else if (ev == ANALOG_EVENT_POLARITY && p->hanguponpolarityswitch && p->polarity == POLARITY_REV) {
ast_debug(1, "Hanging up due to polarity reversal on channel %d while detecting callerid\n", p->channel);
p->polarity = POLARITY_IDLE;
ast_hangup(chan);