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
This commit is contained in:
Ivan Poddubnyi 2019-09-13 15:02:11 +02:00 committed by George Joseph
parent a63c7883b4
commit c63ab5580c
1 changed files with 6 additions and 0 deletions

View File

@ -2608,9 +2608,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;