{"id":930,"date":"2016-01-29T17:16:36","date_gmt":"2016-01-29T12:16:36","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=930"},"modified":"2016-01-29T17:25:19","modified_gmt":"2016-01-29T12:25:19","slug":"asterisk-queue-statistics","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=930","title":{"rendered":"Asterisk: Queue statistics"},"content":{"rendered":"<p>As it&#8217;s said in <a href=\"http:\/\/doxygen.asterisk.org\/trunk\/Config_qu.html\" target=\"_blank\">queues.conf<\/a>:<\/p>\n<pre>\r\n  ; If set to yes, the following variables will be set\r\n  ; just prior to the caller being bridged with a queue member\r\n  ; and just prior to the caller leaving the queue\r\n  ; QUEUENAME name of the queue\r\n  ; QUEUEMAX maxmimum number of calls allowed\r\n  ; QUEUESTRATEGY the strategy of the queue;\r\n  ; QUEUECALLS number of calls currently in the queue\r\n  ; QUEUEHOLDTIME current average hold time\r\n  ; QUEUECOMPLETED number of completed calls for the queue\r\n  ; QUEUEABANDONED number of abandoned calls\r\n  ; QUEUESRVLEVEL queue service level\r\n  ; QUEUESRVLEVELPERF current service level performance\r\n  ;\r\n  ;setqueuevar=no\r\n<\/pre>\n<p>So, add &#8216;setqueuevar=yes&#8217; to each queue definition in queues.conf and then modify your dialplan after execution of the Queue application:<\/p>\n<pre>\r\n  Queue(${EXTEN},t,,,25);\r\n\r\n  \/\/ to enable Queue statistics\r\n  NoOp(${QUEUE_VARIABLES(${EXTEN})});\r\n\r\n  NoOp(QUEUESTRATEGY is ${QUEUESTRATEGY});\r\n  NoOp(QUEUECALLS is ${QUEUECALLS});\r\n  NoOp(QUEUEHOLDTIME is ${QUEUEHOLDTIME});\r\n  NoOp(QUEUECOMPLETED is ${QUEUECOMPLETED});\r\n  NoOp(QUEUEABANDONED is ${QUEUEABANDONED});\r\n  NoOp(QUEUESRVLEVEL is ${QUEUESRVLEVEL});\r\n  NoOp(QUEUESRVLEVELPERF is ${QUEUESRVLEVELPERF})\r\n<\/pre>\n<p>Console output:<\/p>\n<pre>\r\n  Executing [007@inc:33] NoOp(\"007@inc-1658;2\", \"0\") in new stack\r\n  Executing [007@inc:34] NoOp(\"007@inc-1658;2\", \"QUEUESTRATEGY is ringall\") in new stack\r\n  Executing [007@inc:35] NoOp(\"007@inc-1658;2\", \"QUEUECALLS is 0\") in new stack\r\n  Executing [007@inc:36] NoOp(\"007@inc-1658;2\", \"QUEUEHOLDTIME is 6\") in new stack\r\n  Executing [007@inc:37] NoOp(\"007@inc-1658;2\", \"QUEUECOMPLETED is 12778\") in new stack\r\n  Executing [007@inc:38] NoOp(\"007@inc-1658;2\", \"QUEUEABANDONED is 34844\") in new stack\r\n  Executing [007@inc:39] NoOp(\"007@inc-1658;2\", \"QUEUESRVLEVEL is 10\") in new stack\r\n  Executing [007@inc:40] NoOp(\"007@inc-1658;2\", \"QUEUESRVLEVELPERF is 54.6\") in new stack\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>As it&#8217;s said in queues.conf: ; If set to yes, the following variables will be set ; just prior to the caller being bridged with a queue member ; and just prior to the caller leaving the queue ; QUEUENAME name of the queue ; QUEUEMAX maxmimum number of calls allowed ; QUEUESTRATEGY the strategy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,141,142,143],"class_list":["post-930","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-asterisk","tag-queue","tag-queues","tag-queues-conf"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=930"}],"version-history":[{"count":7,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/930\/revisions"}],"predecessor-version":[{"id":937,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/930\/revisions\/937"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}