From: Frederic LE FOLL Date: Thu, 7 Nov 2019 17:54:22 +0000 (+0100) Subject: chan_dahdi: PRI span status may stay "Down, Active" after a short alarm X-Git-Tag: 17.1.0-rc1~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3dd4c5459846b0bff4864f8089418a475c603db;p=thirdparty%2Fasterisk.git chan_dahdi: PRI span status may stay "Down, Active" after a short alarm Upon a short PRI disconnection, libpri may maintain Q.921 layer 'up' and may thus not send PRI_EVENT_DCHAN_DOWN / PRI_EVENT_DCHAN_UP events. If pri_event_alarm() clears DCHAN_UP status bit upon alarm detection and no Q.921 reconnection sequence occurs, chan_dahdi will keep seeing span status "Down" at the end of alarm. This patch modifies pri_event_alarm() in order to keep DCHAN_UP bit unchanged. libpri will send a PRI_EVENT_DCHAN_DOWN event if it detects a disconnection of Q.921 layer and this will clear DCHAN_UP if required. ASTERISK-28615 Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996 --- diff --git a/channels/sig_pri.c b/channels/sig_pri.c index 82048b3488..4c70c6beaa 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -2241,7 +2241,7 @@ static void *pri_ss_thread(void *data) void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri) { - pri->dchanavail[index] &= ~(DCHAN_NOTINALARM | DCHAN_UP); + pri->dchanavail[index] &= ~DCHAN_NOTINALARM; if (!before_start_pri) { pri_find_dchan(pri); }