Get queue status

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.

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

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…


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


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…


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.


How about setting

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: