diff -uNr asterisk-1.6.1.6.ORIG/channels/chan_dahdi.c asterisk-1.6.1.6/channels/chan_dahdi.c --- asterisk-1.6.1.6.ORIG/channels/chan_dahdi.c 2009-10-26 12:57:27.000000000 +0000 +++ asterisk-1.6.1.6/channels/chan_dahdi.c 2009-10-26 12:59:26.000000000 +0000 @@ -7287,6 +7287,7 @@ } if (i & DAHDI_IOMUX_SIGEVENT) { res = dahdi_get_event(p->subs[idx].dfd); + if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0; ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res)); if (p->cid_signalling == CID_SIG_V23_JP) { @@ -7389,6 +7390,7 @@ if (i & DAHDI_IOMUX_SIGEVENT) { res = dahdi_get_event(p->subs[idx].dfd); ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res)); + if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0; res = 0; /* Let us detect distinctive ring */ @@ -7540,6 +7542,7 @@ if (i & DAHDI_IOMUX_SIGEVENT) { res = dahdi_get_event(p->subs[idx].dfd); ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res)); + if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0; /* If we get a PR event, they hung up while processing calerid */ if ( res == DAHDI_EVENT_POLARITY && p->hanguponpolarityswitch && p->polarity == POLARITY_REV) { ast_log(LOG_DEBUG, "Hanging up due to polarity reversal on channel %d while detecting callerid\n", p->channel); @@ -7609,6 +7612,7 @@ if (i & DAHDI_IOMUX_SIGEVENT) { res = dahdi_get_event(p->subs[idx].dfd); ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res)); + if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0; res = 0; /* Let us detect callerid when the telco uses distinctive ring */