From: Ivan Poddubnyi Date: Fri, 13 Sep 2019 13:02:11 +0000 (+0200) Subject: app_queue: Fix conversion of complex extension states into device states X-Git-Tag: 18.3.0-rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=985d3e4940ccb92309fd45117501680f56ed1275;p=thirdparty%2Fasterisk.git 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 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index db98cea613..eddf5c70ec 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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;