I am trying to grab data from RTAgentsLoggedIn and RTRiassunto for multiple queues. The problem I'm having is that some of the data for some queues seems to be missing in the response when I make the request for multiple queues at once.
For example, If I make a request with the queue value set to "100", I'll get a full listing of all members in that queue as well as an entry in RTRiassunto with all of the info that is to be expected. If I then make a request for "101", I will get another full, complete block of data.
If I make a request for "100|101", I will not get the same data set back. I'll instead see (in this particular case) only the member listings for 100, and only the RTRiassunto data for 100 as well. I've tried this with a combination of different queues, and it seems to have something to do with the queues themselves. The same queues will always "disappear" in the response when combined. For instance "100|101|102|103" might show 100 and 103, but 101 will again be gone, as will 102.
I've tested this against my script, as well as against a script I found on this forum, which I've provided below. Any help is greatly appreciated!!
<?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" );
}
}
}
?>