QueueMetrics > Scripting QueueMetrics
Question on RealtimeDO.RTRiassunto
QueueMetrics:
This is caused by the security model - QM is "blind" to queues that is not supposed to see in the queue list.
In any case, if you can see the details of each single queue in the Realtime page, you should be able to access those right from the XML-RPC interface as well.
barryf:
--- Quote from: QueueMetrics on January 16, 2009, 08:52:52 ---In any case, if you can see the details of each single queue in the Realtime page, you should be able to access those right from the XML-RPC interface as well.
--- End quote ---
Yes, but that is the crux of my problem. Whereas in the QM Realtime page, if I have an aggregate queue which contains 6 queues, I see the correct number of available agents for each queue. However, if I query these same 6 queues via XML-RPC I am only given the "all selected" information, and if I query each queue individually I am given the wrong information, because it is showing agents free but they are in fact busy in another queue.
This would be solved for me if, when I query by XML-RPC a group of queues, that the result returned included the details of each queue I requested, rather than simply the "all selected" summary.
-Barry
QueueMetrics:
You should be seeing calls in the active queues at least, that is the "all selected" plus a line for each active queue. If you don't, please contact Support so we can open up a bug (they will ask you to send over a config files likely).
We track this as bug #611.
marcos:
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" );
}
}
}
?>
Navigation
[0] Message Index
[*] Previous page
Go to full version