Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - avishnev

Pages: [1]
1
I was able to resolve my issue by implementing the patch mentioned above for logger.c. I rebuilt and re-installed and queue_log is working as before.

2
I had a similar issue with asterisk 1.8.5. queue_log was not being updated. AddQueueMember did not work on all queues. I added static member to each queue i am working on, but it still did not work as in 1.6.2.19. Any Ideas?

3
I solved my own problem. It appears that the call tom QM.realtime was in single quotes and it needed to be in double quotes. Once I changed it, I stopped getting the error and start getting data. However, the data is not correct. The response showed no data even though i selected the queue that asterisk showed with an agent. The agent was in a pause state. queue show cli command showed the agent, but XML-RPC did not. Can someone assist?

4
I am using QM 1.7.0.2 and was trying to test XML-RPC interface by getting the Realtime stats. Starting with a sample php script in the manual for Stats, I modified it to look for Realtime blocks and inbound parameters. When I ran my script (see attached), I get Invalid method name response. the script is using robot user that is enabled in the system.
Code: [Select]
<?php
require_once 'XML/RPC.php';
$qm_server = "209.124.166.74";  // 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("2253|1919|2222|5555|6666"),
                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(9);
$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 
"<h2>Response block: $blockname </h2>";
        echo 
"<table border=1>";
        
$block = $blocks[$blockname];
        for ( 
$r = 0; $r < sizeof( $block ); $r++ ) {
                echo 
"<tr>";
                for ( 
$c = 0; $c < sizeof( $block[$r] ); $c++ ) {
                        echo( 
"<td>" . $block[$r][$c] . "</td>" );
                }
                echo 
"</tr>\n";
        }
        echo 
"</table>";
}
?>



Pages: [1]