QueueMetrics running with UTF-8 charset

QueueMetrics, since version 14.10.5 build 937 is compliant with UTF-8 charset meaning that is possible to use UTF-8 characters when defining agents, QA forms, notes and, more in general, all items in the report.

For new QueueMetrics intalls, where Tomcat and the database are installed together with rpm, there is nothing to do except to use the proper qloader on the Asterisk server (since 14.10.5 build 937 the qloader and the wqloader packages are named with build number aligned with QueueMetrics). For already installed QueueMetrics, instead, a set of steps needs to be performed in order to generate the correct environment.

Below is a list of these steps.

  • Change the default database charset

ALTER DATABASE `queuemetrics` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  • For each table in the database, change the default charset by issuing

ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

where table should be replaced with the name of the table you’re working on. Repeate this step for all tables present in the QueueMetrics database.

qm_tasks table ships with a key that needs to be limited before table conversion. If you receive an error when converting this table, please issue the following step.
ALTER TABLE `qm_tasks` DROP INDEX `pFamily` ,
ADD INDEX `pFamily` ( `pFamily` ( 20 ) , `pID` ( 20 ) );
ALTER TABLE qm_tasks CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
  • Update your Tomcat with the version you can find on QueueMetrics website. Tomcat 6.0.43-23 rpms is the minimum requirement able to properly handle UTF-8. For yum based installs, from a bash on QueueMetrics server, issue the following command:

yum update queuemetrics-tomcat
  • Update your QueueMetrics with a version greater than 14.10.5 build 937. From yum based installs, from a bash on QueueMetrics server, issue the following command:

yum update queuemetrics
  • Edit the SQL connector string used by QueueMetrics to connect to the database. Through a bash in your QueueMetrics server, locate the web.xml file (for yum based install this file is located in the /usr/local/queuemetrics/qm-current/WEB-INF folder). Append to the param-value key in the JDBC_URL section the following codes:

&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
  • Restart QueueMetrics

  • Update the qloader with a version greater than 1.31.937. For a standard yum based install, through a bash in your asterisk box, issue the following command:

yum update qloaderd
Historical queue log data present into the database needs to be reloaded. This could be done only if you have the original queue_log file generated by asterisk for the whole dataset period. In order to to this: stop the qloader daemon, empty the queue_log table then start the qloader daemon. The qloader will start to push the whole dataset since the beginning of the queue_log file.
QA informations already present in the database cannot be migrated. For this reason, historical QA data cannot be guarrantied.