Make sure that you have your /etc/asterisk/manager.conf file configured properly and that you are connecting to the port indicated in that file (usually 5038).
I finally got a chance to take a look at this and the sample but I’m wondering if anyone can tell me what I need to do to get the sample to print out the number of people waiting in each queue. I need that a lot more than I need who is in each queue waiting to take a call.
I’d also like to get how long the longest has been waiting in each queue (which would be the first guy).
I think I figured out the first part. I created an event handler for “QueueParams” and then pulled out “e.Queue” and “e.Calls”. Unfortunately, this only pulls them on launch and not anytime there’s a change or at a setable interval. Can anyone help with that?
Alright, I got the queue name, number of people waiting, and the time the longest has been waiting by using the handlers below and then writing the code to pull the correct elements into some arrays.
dam.QueueParams += new QueueParamsEventHandler(dam_QueueParms);
dam.QueueEntry += new QueueEntryEventHandler(dam_QueueEntry);
The only glitch I still have is that the only way I can update the info is to close the connection and then reinitialize. That seems really inefficient as it takes about 5 seconds to connect and gives me more-than-an-insignificant-blip in CPU usage (~4-7% on my dual-core P4 for about 2 seconds right before reporting the data). Does anyone know how I can get it to just fetch the info on demand or do I not get a choice?