summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-09-08 16:44:36 +0000
committerMark Spencer <markster@digium.com>2003-09-08 16:44:36 +0000
commit1e19f72077a8e2f5befb21bb5c3f2131f8b24107 (patch)
treeb27b0710be1354a8026f5cc2c9ccf56b5bc4ccde /apps/app_queue.c
parent541a3eb0b17e8c32b582a34bed3b4a96aee0e07f (diff)
First of Jayson's manager patches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rwxr-xr-xapps/app_queue.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 265c82dcd..af349a0d7 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1407,19 +1407,25 @@ static int manager_queues_status( struct mansession *s, struct message *m )
{
time_t now;
int pos;
+ char *id = astman_get_header(m,"ActionID");
+ char idText[256] = "";
struct ast_call_queue *q;
struct queue_ent *qe;
- astman_send_ack(s, "Queue status will follow");
+ astman_send_ack(s, m, "Queue status will follow");
time(&now);
q = queues;
+ if (id && &id) {
+ snprintf(idText,256,"ActionID: %s\r\n",id);
+ }
while(q) {
ast_mutex_lock(&q->lock);
ast_cli(s->fd, "Event: QueueParams\r\n"
"Queue: %s\r\n"
"Max: %d\r\n"
"Calls: %d\r\n"
+ "%s"
"\r\n",
- q->name, q->maxlen, q->count);
+ q->name, q->maxlen, q->count,idText);
#if 0
/* Do we care about queue members? */
for (mem = q->members; mem; mem = mem->next)
@@ -1433,8 +1439,9 @@ static int manager_queues_status( struct mansession *s, struct message *m )
"Channel: %s\r\n"
"CallerID: %s\r\n"
"Wait: %ld\r\n"
+ "%s"
"\r\n",
- q->name, pos++, qe->chan->name, (qe->chan->callerid ? qe->chan->callerid : ""), now - qe->start);
+ q->name, pos++, qe->chan->name, (qe->chan->callerid ? qe->chan->callerid : ""), now - qe->start), idText;
ast_mutex_unlock(&q->lock);
q = q->next;
}