As it’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 of the queue; ; QUEUECALLS number of calls currently in the queue ; QUEUEHOLDTIME current average hold time ; QUEUECOMPLETED number of completed calls for the queue ; QUEUEABANDONED number of abandoned calls ; QUEUESRVLEVEL queue service level ; QUEUESRVLEVELPERF current service level performance ; ;setqueuevar=no
So, add ‘setqueuevar=yes’ to each queue definition in queues.conf and then modify your dialplan after execution of the Queue application:
  Queue(${EXTEN},t,,,25);
  // to enable Queue statistics
  NoOp(${QUEUE_VARIABLES(${EXTEN})});
  NoOp(QUEUESTRATEGY is ${QUEUESTRATEGY});
  NoOp(QUEUECALLS is ${QUEUECALLS});
  NoOp(QUEUEHOLDTIME is ${QUEUEHOLDTIME});
  NoOp(QUEUECOMPLETED is ${QUEUECOMPLETED});
  NoOp(QUEUEABANDONED is ${QUEUEABANDONED});
  NoOp(QUEUESRVLEVEL is ${QUEUESRVLEVEL});
  NoOp(QUEUESRVLEVELPERF is ${QUEUESRVLEVELPERF})
Console output:
  Executing [007@inc:33] NoOp("007@inc-1658;2", "0") in new stack
  Executing [007@inc:34] NoOp("007@inc-1658;2", "QUEUESTRATEGY is ringall") in new stack
  Executing [007@inc:35] NoOp("007@inc-1658;2", "QUEUECALLS is 0") in new stack
  Executing [007@inc:36] NoOp("007@inc-1658;2", "QUEUEHOLDTIME is 6") in new stack
  Executing [007@inc:37] NoOp("007@inc-1658;2", "QUEUECOMPLETED is 12778") in new stack
  Executing [007@inc:38] NoOp("007@inc-1658;2", "QUEUEABANDONED is 34844") in new stack
  Executing [007@inc:39] NoOp("007@inc-1658;2", "QUEUESRVLEVEL is 10") in new stack
  Executing [007@inc:40] NoOp("007@inc-1658;2", "QUEUESRVLEVELPERF is 54.6") in new stack