Listing calls in a queue that wait for an agent to pickup the call

Hi,

I saw that I could enter the asterisk CLI command “asterisk -rx ‘queue show 1050’”. So I thought I could write a PHP script/page that would execute this command and show the results nicely in a webpage.

I succeeded to do this, but I am wondering what you think of this kind of solution? Would it take to many resources of Asterisk if I make a webpage that does this command every 30 seconds?

Are there any better ways or open source tools to get a listing of the current calls in a queue?

For those who are interested I did the following for now:

<? exec("asterisk -rx 'queue show 1050' | sed 1d", $output, $return_var); for($i=0; $i<=(count($output) - 2); $i++) { echo $output[$i]."
"; } ?> As you can see no lay-out yet or something familar, before I do I just want to exchange thoughts about this. Is it a can do or a please do not?

Mark

404, page not found for your script.

Sorry link was incorrect. Added the correct one now in my previous post.

Finished making the script. Hopefully it does not give to much of a load to the Asterisk server. As far as I could see the load wasn’t to high, but it will react differently when a lot of users would use it.

For people who are interested for their own needs, you can download the PHP page here:
http://www.markinthedark.nl/news/scripts/76-show-callers-waiting-in-an-asterisk-queue.html
Mark