]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue: Fix conversion of complex extension states into device states
authorIvan Poddubnyi <ivan.poddubny@gmail.com>
Fri, 13 Sep 2019 13:02:11 +0000 (15:02 +0200)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 23 Feb 2021 19:37:22 +0000 (13:37 -0600)
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

apps/app_queue.c

index db98cea613fcc96ecfb19e73bb2cb59eb9b3899f..eddf5c70ec7afc5ae56d75cc672e435e05b17ca0 100644 (file)
@@ -2605,9 +2605,15 @@ static int extensionstate2devicestate(int state)
        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;