Hi Barry,
I'm trying to replicate the problem you arise but I'm unable to do it. I'm running the PHP code you can find in the QM_XML-RPC_manual_151.pdf (you can download from QueueMetrics support page).
I've modified it a little bit to be able to access to Realtime reports and, for what I can understand, QueueMetrics seems working correctly: if I select more than one queue in the XML RPC query parameters, QueueMetrics is answering with one line for each selected queue plus the "all selected" summary line.
I think that this is the wanted behavior.
I post below the code I'm using; could you, please, test it on your QM revision?
Thank you and best regards.
Marco.
<?php
require_once 'XML/RPC.php';
$qm_server = "yourmachine"; // the QueueMetrics server address
$qm_port = "8080"; // the port QueueMetrics is running on
$qm_webapp = "queuemetrics"; // the webapp name for QueueMetrics
// set which response blocks we are looking for
$req_blocks = new XML_RPC_Value(array(
new XML_RPC_Value("RealtimeDO.RTRiassunto"),
new XML_RPC_Value("RealtimeDO.RTCallsBeingProc"),
new XML_RPC_Value("RealtimeDO.RTAgentsLoggedIn")
), "array");
// general invocation parameters - see the documentation
$params = array(
new XML_RPC_Value("200|300"),
new XML_RPC_Value("robot"),
new XML_RPC_Value("robot"),
new XML_RPC_Value(""),
new XML_RPC_Value(""),
$req_blocks
);
$msg = new XML_RPC_Message('QM.realtime', $params);
$cli = new XML_RPC_Client("/$qm_webapp/xmlrpc.do", $qm_server, $qm_port);
//$cli->setDebug(1);
$resp = $cli->send($msg);
if (!$resp) {
echo 'Communication error: ' . $cli->errstr;
exit;
}
if ($resp->faultCode()) {
echo 'Fault Code: ' . $resp->faultCode() . "\n";
echo 'Fault Reason: ' . $resp->faultString() . "\n";
} else {
$val = $resp->value();
$blocks = XML_RPC_decode($val);
// now we print out the details....
printBlock( "result", $blocks );
printBlock( "RealtimeDO.RTRiassunto", $blocks );
printBlock( "RealtimeDO.RTCallsBeingProc", $blocks );
printBlock( "RealtimeDO.RTAgentsLoggedIn", $blocks );
}
// output a response block as HTML
function printBlock( $blockname, $blocks ) {
echo "Response block: $blockname \n";
$block = $blocks[$blockname];
for ( $r = 0; $r < sizeof( $block ); $r++ ) {
echo "\n";
for ( $c = 0; $c < sizeof( $block[$r] ); $c++ ) {
echo( $block[$r][$c] . "\t" );
}
}
}
?>