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

George Joseph asteriskteam at digium.com
Tue Feb 23 13:38:41 CST 2021


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

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 db98cea..eddf5c7 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2605,9 +2605,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/+/15428
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I127e06943d4b4f1afc518f9e396de77449992b9f
Gerrit-Change-Number: 15428
Gerrit-PatchSet: 2
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/8be85469/attachment.html>


More information about the asterisk-code-review mailing list