summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-09-20 18:44:26 +0000
committerMatthew Jordan <mjordan@digium.com>2012-09-20 18:44:26 +0000
commitca0e96ae199ce5dd38887ee40114db81ab73a534 (patch)
tree2e5243c8e8956ab5f910c4ce065d157abe4d9691 /apps
parente8380afc8a147ee299c3881423b2e0b27c4cfc0d (diff)
Add queue monitoring hints
This patch adds support for hints on a queue. Hints can be added using the nomenclature 'Queue:name', where name is the name of the queue being monitored. This nifty feature was done by Alec Davis. Review: https://reviewboard.asterisk.org/r/1619 Reported by: Alec Davis Tested by: alecdavis patches: review1619.diff2 by alecdavis (license 585) ........ Merged revisions 373235 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 69938e4f3..3c00d7692 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2868,6 +2868,10 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *
ast_copy_string(qe->announce, q->announce, sizeof(qe->announce));
ast_copy_string(qe->context, q->context, sizeof(qe->context));
q->count++;
+ if (q->count == 1) {
+ ast_devstate_changed(AST_DEVICE_RINGING, "Queue:%s", q->name);
+ }
+
res = 0;
/*** DOCUMENTATION
<managerEventInstance>
@@ -3172,6 +3176,9 @@ static void leave_queue(struct queue_ent *qe)
if (current == qe) {
char posstr[20];
q->count--;
+ if (!q->count) {
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Queue:%s", q->name);
+ }
/* Take us out of the queue */
/*** DOCUMENTATION