Astman Queue Status Listener

Hello All -

I am trying to create a simple page that displays how may calls are in a queue, how long they have been waiting, etc. I have read up on the astman commands, however I’m not sure how to incorporate a listener for the response.

So far I have the following:

<?php include_once("/etc/freepbx.conf"); global $astman; print_r($astman->QueueStatus($actionid=NULL)); ?>

This outputs:

Array ( [Response] => Success [Message] => Queue status will follow )

I assume this is because I need to setup some sort of listener to listen for the response of the command. Does anybody have any example code or suggestions on how I can go about doing this? I appreciate any assistance that you can provide.

Thank you!