[Asterisk-code-review] app_queue: Fix conversion of complex extension states into device states (asterisk[16])

George Joseph asteriskteam at digium.com
Tue Feb 23 13:37:52 CST 2021


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

Change subject: app_queue: Fix conversion of complex extension states into device states
......................................................................

app_queue: Fix conversion of complex extension states into device states

Queue members using dialplan hints as a state interface must handle
INUSE+RINGING hint as RINGINUSE devstate, and INUSE + ONHOLD as INUSE.

ASTERISK-28369

Change-Id: I127e06943d4b4f1afc518f9e396de77449992b9f
---
M apps/app_queue.c
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/apps/app_queue.c b/apps/app_queue.c
index 0a03350..e0bec9c 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2608,9 +2608,15 @@
 	case AST_EXTENSION_RINGING:
 		state = AST_DEVICE_RINGING;
 		break;
+	case AST_EXTENSION_INUSE | AST_EXTENSION_RINGING:
+		state = AST_DEVICE_RINGINUSE;
+		break;
 	case AST_EXTENSION_ONHOLD:
 		state = AST_DEVICE_ONHOLD;
 		break;
+	case AST_EXTENSION_INUSE | AST_EXTENSION_ONHOLD:
+		state = AST_DEVICE_INUSE;
+		break;
 	case AST_EXTENSION_UNAVAILABLE:
 		state = AST_DEVICE_UNAVAILABLE;
 		break;

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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I127e06943d4b4f1afc518f9e396de77449992b9f
Gerrit-Change-Number: 15397
Gerrit-PatchSet: 3
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210223/689a0924/attachment.html>


More information about the asterisk-code-review mailing list