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 - WRP

Pages: 1 [2] 3 4
16
The MIME type should override any settings from the URL, so if that is correct, that should be it.

RFC 2616 states that a web request can include an "Accept" header which specifies the format of file that is required to be returned. Since the QM URL ends in ".do", every major web browser (IE, Firefox, Chrome, Safari) defaults to requesting "text/html, application/xml", etc. QM responds with "audio/wav".

In other words, MIME types in the response do not have the ability to override the request header data. URLs do not intrinsically have any settings.

Two problems here:

1) The URL ends in ".do", causing the browser to set a default "Accept" value. The URL should end in .wav, as this is a .wav resource.

2) QM is ignoring the Accept header. In this case, if anything, QM should return with a "406 Not Acceptable"


Resources:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html ( sec 14.1 )
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html ( sec 10.4.7 )

17
The browser is able to play back the audio files that Asterisk is recording. In my first post, I mention that I can "Save As" the audio file to the desktop and then open it with any browser. It plays back perfectly.

The problem lies in trying to open the audio file from the link provided in QueueMetrics, directly from QueueMetrics. Since QueueMetrics is forwarding us to a URL ending in ".do", the browser doesn't know what to expect, so it defaults to HTML. When audio/wav formatted data comes back instead, the browser fails to play it back because, as it states, "Resource interpreted as Document but transferred with MIME type audio/wav".

To summarize:
* Asterisk audio format is readable by the browser
* Tomcat is returning the resource with the right MIME type of audio/wav.
* The browser is refusing to play it because QueueMetrics is sending the browser to a ".do" file URL, which is not the correct extension for audio.

18
I have to disagree with you. Any link that leads to a file that can be opened by the browser, by default, should be opened by the browser. Clicking on a link that leads to an audio file should play the audio file in the web browser, unless the user specifies otherwise ("Save As", etc). The problem seems to lie in how you dispatch audio files to the browser.

I cannot tell customers "you'll need to save each audio file to your desktop before hearing it". Please patch this bug! :)


19
Running QueueMetrics / Cannot play audio recordings in browser(s)
« on: March 23, 2012, 05:38:10 »
We are unable to play back audio recordings in our browsers. With Chrome and Safari, we simply get a non-clickable audio control or broken Quicktime logo. For Firefox, we can generally play the audio file, but it will be truncated.

We are able to download the files by right clicking and saving. We can even play the downloaded files by opening any one of these browsers.

From what I can tell, this is an issue with the download URL ending in .do, even though a .WAV file is returned. The browser sends headers for an html or xml document, but gets audio/wav in return. I've attached screenshots of the errors that Safari throws in its webkit development console. The error, specifically, is "Resource interpreted as Document but transferred with MIME type audio/wav."

How can we resolve this issue?






20
Have you had a chance to look into this yet? This issue is causing additional load on our servers.

Thanks!

21
Something else I'm noticing is that for the "trouble queues", when they are polled individually, the RTR response only includes the "all selected" result, not the particular queue result. Queues that aren't having issues will show the "all selected" result as well as a row of data for the particular queue.

22
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!!

Code: [Select]
<?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" );
            }
        }
    }
?>

23
I have submitted this information to support. Thanks.

24
When I run a custom report on "Answered Calls (for selected queues)" for a particular hour of the day, I'm finding that not all of the agents are being listed. If I look at the "Ans Dt." tab, I see agents answering calls that aren't listed. These calls occur well within the hour and end before the hour is up, so they don't appear to be border cases.

I looked over the configurations for the agents that aren't showing in the report and found no differences between them and the agents that are appearing.

For reference sake, I discovered this problem when using the XML-RPC interface. I then generated a custom report from the web interface as a troubleshooting step and found the same problem there.

Is this a bug? Any help is greatly appreciated!

25
Can you suggest the SQL syntax to achieve this?

26
We increased the amount of CPU and memory resources available recently, but this was after we began having performance issues. From every measurement I can find, it appears as though only the CPU is being stressed.

The queries normally return within 100 ms, but as of late, they have been taking up to 50 seconds (with 10-15 of these similar queries sitting in the processlist all at the same time).

What do you suggest we do to further troubleshoot this issue? Are there system tests that we can run or MySQL optimizations worth considering? I'm normally able to get on the system when the CPU pegging is occurring, so running tests or taking measurements while the issue is occurring is not out of the question.

27
Thanks for the reply. Here is the output:

Code: [Select]
mysql> EXPLAIN
    -> SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , '3000'  , 'none'  , 'q-300' )   ORDER BY time_id ASC , unique_row_count ASC;
+----+-------------+-----------+-------+----------------------+--------------+---------+------+-------+-------------+
| id | select_type | table     | type  | possible_keys        | key          | key_len | ref  | rows  | Extra       |
+----+-------------+-----------+-------+----------------------+--------------+---------+------+-------+-------------+
|  1 | SIMPLE      | queue_log | range | idx_sel,partizione_b | partizione_b | 26      | NULL | 74032 | Using where |
+----+-------------+-----------+-------+----------------------+--------------+---------+------+-------+-------------+

28
We are still having this issue. We've tried increasing the resources that MySQL is allowed, but it hasn't helped. Here is our current MySQL config:

Code: [Select]
[mysqld]
query_cache_size = 128M
thread_cache = 8
table_cache = 768
query_cache_limit = 128M
tmp_table_size = 128M
max_heap_table_size = 128M
join_buffer_size = 16M

log_slow_queries = /var/log/mysqld.slow.log
long_query_time = 2
log-queries-not-using-indexes

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

29
MySQL storage and Qloaderd/Uniloader / MySQL performance issues
« on: May 26, 2011, 00:51:41 »
Just today, we began experiencing MySQL performance issues with our Queuemetrics install. MySQL will jump up to 150-200% CPU in top for 5-15 seconds or so every so often and cause the Queuemetrics web interface to lag greatly. This issue seems to have started roughly two weeks ago and has gradually become more prominent.

I was able to grab the processlist from MySQL during one of the slowdowns.  I've included the output at the bottom of this message. As you can see, the queuemetrics queries are running slowly (up to 9 seconds of execution time). If I check the processlist when the CPU isn't high, there will generally only be a single queuemetrics query, and according to the tomcat logs, they will only take around 100ms to execute.

We did increase the amount of memory available to Java to 512MB. This may have helped marginally.

Has anyone seen anything like this before? How can we solve this performance problem?


Code: [Select]
mysql> show full processlist;
+------+--------------+---------------------+--------------+---------+------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id   | User         | Host                | db           | Command | Time | State        | Info                                                                                                                                                                                                                                                                                                                                                             |
+------+--------------+---------------------+--------------+---------+------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 3517 | queuemetrics | 64.207.128.55:57419 | queuemetrics | Sleep   |    6 |              | NULL                                                                                                                                                                                                                                                                                                                                                             |
| 7353 | queuemetrics | localhost           | NULL         | Query   |    0 | NULL         | show full processlist                                                                                                                                                                                                                                                                                                                                            |
| 7411 | queuemetrics | localhost:58330     | queuemetrics | Query   |    9 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , 'q-301'  , '3005'  , '3006'  , 'none'  , '3003'  , '3004'  , '3009'  , '3008' )   ORDER BY time_id ASC , unique_row_count ASC |
| 7412 | queuemetrics | localhost:58331     | queuemetrics | Query   |    7 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , '3000'  , 'none'  , 'q-300' )   ORDER BY time_id ASC , unique_row_count ASC                                                   |
| 7413 | queuemetrics | localhost:58332     | queuemetrics | Query   |    6 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , 'q-301'  , '3005'  , '3006'  , 'none'  , '3003'  , '3004'  , '3009'  , '3008' )   ORDER BY time_id ASC , unique_row_count ASC |
| 7414 | queuemetrics | localhost:58333     | queuemetrics | Query   |    4 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , 'q-301'  , '3005'  , '3006'  , 'none'  , '3003'  , '3004'  , '3009'  , '3008' )   ORDER BY time_id ASC , unique_row_count ASC |
| 7415 | queuemetrics | localhost:58334     | queuemetrics | Query   |    3 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , 'q-301'  , '3005'  , '3006'  , 'none'  , '3003'  , '3004'  , '3009'  , '3008' )   ORDER BY time_id ASC , unique_row_count ASC |
| 7417 | queuemetrics | localhost:58336     | queuemetrics | Query   |    1 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , 'q-301'  , '3005'  , '3006'  , 'none'  , '3003'  , '3004'  , '3008' )   ORDER BY time_id ASC , unique_row_count ASC           |
| 7418 | queuemetrics | localhost:58337     | queuemetrics | Query   |    0 | Sending data | SELECT time_id , call_id , queue , agent , verb , data1 , data2 , data3 , data4 , data5   FROM queue_log  WHERE  partition ='P001' AND        (time_id >= '1306306800' AND time_id<='1577869260')     AND queue IN ( '', 'NONE'  , '3000'  , 'none'  , 'q-300' )   ORDER BY time_id ASC , unique_row_count ASC                                                   |
+------+--------------+---------------------+--------------+---------+------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9 rows in set (0.00 sec)

30
Highly doubtful. We're talking about a *.wav file and the Safari browser. Have you tried to duplicate this problem on your end?

Pages: 1 [2] 3 4