[Asterisk-code-review] chan_dahdi: PRI span status may stay "Down, Active" after a short alarm (asterisk[16])

Frederic LE FOLL asteriskteam at digium.com
Thu Nov 7 12:05:49 CST 2019


Frederic LE FOLL has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13167 )


Change subject: chan_dahdi: PRI span status may stay "Down, Active" after a short alarm
......................................................................

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-25615

Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996
---
M channels/sig_pri.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/67/13167/1

diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index abbfcdd..2cf0df2 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -2241,7 +2241,7 @@
 
 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);
 	}

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13167
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996
Gerrit-Change-Number: 13167
Gerrit-PatchSet: 1
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191107/eba138c3/attachment.html>


More information about the asterisk-code-review mailing list