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
changes/78/78/1
Matthew Jordan 13 years ago
parent e8380afc8a
commit ca0e96ae19

@ -173,6 +173,7 @@ Queue
be logged in the agent field for ADDMEMBER and REMOVEMEMBER queue events if a
state_interface has been set.
* Add queue monitoring hints. exten => 8501,hint,Queue:markq.
SayUnixTime
------------------

@ -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

@ -708,12 +708,16 @@ include => demo
;exten => 6600,hint,park:701@parkedcalls
;exten => 6600,1,noop
;
;To subscribe to the availability of a free member in the 'markq' queue.
;Note: '_avail' is added to the QueueName
;exten => 8501,hint,Queue:markq_avail
;exten => 8501,1,Queue(markq)
;
; You can also monitor the status of a queue by providing a hint for a
; particular queue name.
;exten => 8502,hint,Queue:markq
;exten => 8502,1,Queue(markq)
;
; Some other handy things are an extension for checking voicemail via
; voicemailmain
;

Loading…
Cancel
Save