QueueMetrics > Scripting QueueMetrics

Wallboard Example script

(1/10) > >>

barryf:
Hi,

Here is a small script to grab the calls waiting and Agent information for a given queue from the QueueMetrics XML-RPC service and create a simple display for use on a wallboard.
 
Display colours will change from Green to Yellow to Red depending on Calls waiting, Ready Agents. Will also sound an alarm.
 
This has proved useful in a large callcentre where the standard QM RT monitoring screen is too detailed and hard to see from a distance.

Screenshots:
http://www.flantel.com/qm/qmon1.jpg
http://www.flantel.com/qm/qmon2.jpg


Get the code here:
http://www.flantel.com/qm/qmon.php.txt

Feel free to use it, improve it, just share your changes!

-Barry Flanagan

QueueMetrics:
Super cool  ;D how do you set up the script?

barryf:

--- Quote from: QueueMetrics on December 10, 2007, 12:29:37 ---Super cool  ;D how do you set up the script?


--- End quote ---

Basic instructions are in comments in the script.

To use, simply define the queues you want to monitor as $queueid, and set the QM ROBOT user and PASS, as well as the IP address of your QM server.

I allow passing of a GET variable within the URL to select the queue to monitor, which is then evaluated in the switch statement. Just define $queueid to contain the Asterisk queue names (not the QM aliases). So just change the $queuename and $queueid in the switch statement to suit your needs.

If you want to set a default queue for when no GET is included (i.e. /qmon.php?queue=QUEUENAME) then define this in $defaultqueue.


--- Code: ---// Set which queue you want to default to when none is specified
$defaultqueue = 'verification';

// Allow seting of the queue to monitor, and the refresh time.
isset($_REQUEST['refresh'])?$refresh = $_REQUEST['refresh']:$refresh=120;
isset($_REQUEST['queue'])?$queuereq = $_REQUEST['queue']:$queuereq=$defaultqueue;

// Depending on which queue was requested, set $queueid for passing to queuemetrics.
switch ($queuereq) {
  case 'verification':
    $queueid = "301|310|311|312";
    $queuename='Dublin Verification';
    break ;;
  case 'inbound':
    $queueid = "401|402|403|404|405|406|407|408|409|410|411|412";
    $queuename='Inbound';
    break;;
  case 'outbound':
    $queueid = "Outbound";
    $queuename='Outbound';
    break ;;
}


// Set up the XML-RPC instance.
require_once 'XML/RPC.php';
$qm_server = "127.0.0.1"; // the QueueMetrics server address
$qm_port   = "8080";        // the port QueueMetrics is running on
$qm_webapp = "queuemetrics"; // the webapp name for QueueMetrics
--- End code ---


Hope this helps.

-Barry Flanagan

QueueMetrics:
That's great!  ;) :D

moa:
 ???

I'm unable to get this script to work.
I receive this error:

Fault Code: 5 Fault Reason: Didn't receive 200 OK from remote server. (HTTP/1.1 302 Moved Temporarily)

My guess is its looking for "/$qm_webapp/xmlrpc.do".  I tried looking through all of the queuemetrics directories but I'm cant find it anywhere.

Any ideas?

Navigation

[0] Message Index

[#] Next page

Go to full version