[asterisk-commits] mjordan: branch 11 r373235 - in /branches/11: ./ apps/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 20 13:36:15 CDT 2012
Author: mjordan
Date: Thu Sep 20 13:36:11 2012
New Revision: 373235
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373235
Log:
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)
Modified:
branches/11/CHANGES
branches/11/apps/app_queue.c
branches/11/configs/extensions.conf.sample
Modified: branches/11/CHANGES
URL: http://svnview.digium.com/svn/asterisk/branches/11/CHANGES?view=diff&rev=373235&r1=373234&r2=373235
==============================================================================
--- branches/11/CHANGES (original)
+++ branches/11/CHANGES Thu Sep 20 13:36:11 2012
@@ -150,6 +150,7 @@
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
------------------
Modified: branches/11/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_queue.c?view=diff&rev=373235&r1=373234&r2=373235
==============================================================================
--- branches/11/apps/app_queue.c (original)
+++ branches/11/apps/app_queue.c Thu Sep 20 13:36:11 2012
@@ -2811,6 +2811,10 @@
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>
@@ -3115,6 +3119,9 @@
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
Modified: branches/11/configs/extensions.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/11/configs/extensions.conf.sample?view=diff&rev=373235&r1=373234&r2=373235
==============================================================================
--- branches/11/configs/extensions.conf.sample (original)
+++ branches/11/configs/extensions.conf.sample Thu Sep 20 13:36:11 2012
@@ -707,6 +707,11 @@
;the status of the first parking lot with this extensions' help
;exten => 6600,hint,park:701 at parkedcalls
;exten => 6600,1,noop
+;
+; 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
More information about the asterisk-commits
mailing list