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

George Joseph asteriskteam at digium.com
Thu Nov 21 09:23:57 CST 2019


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13245 )

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

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

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 82048b3..4c70c6b 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/+/13245
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996
Gerrit-Change-Number: 13245
Gerrit-PatchSet: 1
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191121/3062c7b6/attachment.html>


More information about the asterisk-code-review mailing list