# Get queue status

**URL:** <https://community.asterisk.org/t/get-queue-status/15395>\
**Category:** Asterisk Support\
**Created:** [July 4, 2007, 4:08am UTC](https://community.asterisk.org/t/get-queue-status/15395 "2007-07-04T04:08:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkeenm82](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hkeenm82](https://community.asterisk.org/u/hkeenm82)\
**Post date:** [July 4, 2007, 4:08am UTC](https://community.asterisk.org/t/get-queue-status/15395/1 "2007-07-04T04:08:48Z")

</div>

Hi all,

I’m able to use queue() to ring all extensions and able to successfully connected.

However , what i need here is to get the the queue / call status after the successful call. I tried to get ${QUEUESTATUS} but it returns NULL.

Same result even i tried to get ${DIALSTATUS}, ${ANSWEREDTIME}, ${HANGUPCAUSE} from the agi in Queue(), all return NULL.

This is important to me since i need to know which extension is answering the queue and how is the call status.

Btw, i’m not using agent in queue. Please help…thanks.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [July 4, 2007, 8:00am UTC](https://community.asterisk.org/t/get-queue-status/15395/2 "2007-07-04T08:00:41Z")

</div>

Hi What about the queue log or show queues or show queue ?

---

<div class="post-metadata">

**Author:** ![hkeenm82](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hkeenm82](https://community.asterisk.org/u/hkeenm82)\
**Post date:** [July 4, 2007, 10:11am UTC](https://community.asterisk.org/t/get-queue-status/15395/3 "2007-07-04T10:11:36Z")

</div>

Thanks for your reply.

But i would like to get the queue status in agi only. so that i can save the call information in my database as a log.  
is there any way? please…

thanks.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [July 4, 2007, 11:08am UTC](https://community.asterisk.org/t/get-queue-status/15395/4 "2007-07-04T11:08:25Z")

</div>

Get you agi to call a script to parse the file, Does the show queue command show what you want ?

Ian

---

<div class="post-metadata">

**Author:** ![hkeenm82](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hkeenm82](https://community.asterisk.org/u/hkeenm82)\
**Post date:** [July 5, 2007, 3:45am UTC](https://community.asterisk.org/t/get-queue-status/15395/5 "2007-07-05T03:45:33Z")

</div>

hmm…not really.

the show queue command didnt show me the call duration, destination number, and the call status( busy, noanswer, answer…etc)

This QUEUE() function is very powerful…however, i can’t get the information that i need. It will automatically hangup after successful connect and exit the dial plan without going on to next priority…

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [July 5, 2007, 9:48am UTC](https://community.asterisk.org/t/get-queue-status/15395/6 "2007-07-05T09:48:48Z")

</div>

Hi

> [@](#):
>
> didnt show me the call duration, destination number, and the call status( busy, noanswer, answer…etc)

This is in the CDR records.

YOu need to compare both these information sources to get what you want.

For example a comercial call centre I deploy does just this it draws a info stream and cdr stream and compliles the data as reqired (This is for Mitel Not Asterisk)

Have you looked at the orderly queue product. It might do what you want.

Ian

---

<div class="post-metadata">

**Author:** ![davevg](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@davevg](https://community.asterisk.org/u/davevg)\
**Post date:** [July 5, 2007, 1:27pm UTC](https://community.asterisk.org/t/get-queue-status/15395/7 "2007-07-05T13:27:01Z")

</div>

How about setting

```auto

```

in queues.conf for the queue?  
Then reading it in your AGI? I use perl and Asterisk::AGI so my retrieval looks something like this:

```auto

```
