sipXworks example queue stats screen

Skip to end of metadata
Go to start of metadata

General info

The purpose of the page is to demonstrate the usage of sipXecs PHP API.
Most probably one will need to hack the page to get some useful data out of it.

The example stats page is located in the file /usr/local/sipxworks-phpapi/php/htdocs/acd/queuestats.php and is accessible from under the URL: http://localhost:8112/acd/queuestats.php where localhost can be Your IP of FQDN.

Access restrictions / Security

The page resides in a httpd context defined in /etc/sipxpbx/httpd.conf.d/sipxworks-phpapi.conf.
Onc can restrict access to the page there or by dropping appropriate .htaccess file in /usr/local/sipxworks-phpapi/php/htdocs/ folder.

FAQ

Q: How do I make the page refresh every XX seconds ?

A: make the queuestats.php file header look like the one below.

Replace 30 with desired refresh rate.

Q: How do I change the coloring rules ?

A: You have to hack the PHP code of queuestats.php. All coloring rules are defined in a set of functions named:

Q: How do I test my coloring rules ?

A: change the value of $fakestats to true in /usr/local/sipxworks-phpapi/php/api/sipxglobals.php
This setting will randomize Your stats for every refresh.

Q: How do I choose which queues to display ?

A: Append q[]=queue as parameters to the queuestats.php page.
Like : http://localhost:8112/acd/queuestats.php?q[]=asysta2&q[]=asysta3

Q: How do I show only a selected agent's queues ?

A: Append user=user_name as parameters to the queuestats.php page.
Like : http://localhost:8112/acd/queuestats.php?user=301

Q: How do I query remote ACD server for stats ?

A: Wow, if You have a remote ACD server then You probably now how to do stuff.
Anyways, replace localhost with proper URLs in WSDLs or point the SIPXGLOBALS to the correct ones.
Remember to purge PHP's WSDL cache - eg by running /usr/local/sipxworks-phpapi/php/utils/invalidate_wsdl_cache.sh

Q: How to clear ACD stats

A: sipxproc -r ConfigAgent

Q: Where can I discuss my ideas ?

A: on the sipXworks forum

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.