QueueMetrics Integration

QueueMetrics by Loway lets you monitor agent productivity, measure targets, conversion rates, and view campaign statistics with a simple easy to use interface.
It should work with most versions of AstLinux however a relatively recent version is recommended.

Note -> This guide is for a separate 'Off Box' installation only 1). It also does not go into detail on the setting up of Queue Metrics itself. This guide needs to be read in conjunction with the QueueMetrics documentation found Here.

Although QueueMetrics can be built on any Linux distribution, it is easiest and recommended on an RPM-based distribution. This guide was created using QueueMetrics version 19.10.
The following steps were performed on a Centos 7 Minimal Install. Note that only QueueMetrics related configuration has been included:


Make sure you have a demo or purchased License Key from Loway before you start.
It is also recommended that you create and record passwords for MYSQL Root and Uniloader users and the QueueMetrics AMI user.

Install Application

yum install wget nano
wget -P /etc/yum.repos.d
yum install queuemetrics

Set up MYSQL (MariaDB)

systemctl enable mariadb
systemctl stop mariadb
mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
  SET PASSWORD FOR 'root'@'localhost' = PASSWORD('** New MYSQL Root Password **');

Disable Firewall

The firewall will block the QueueMetrics 8080 Web GUI port by default. You can open this up in IP Tables or disable the firewall altogether as done below.
Note -> This should only be done if the server is suitably protected behind a firewall on an internal LAN.

systemctl disable firewalld
systemctl stop firewalld

Set up Uniloader User

The Uniloader application running on the AstLinux server accesses MYSQL directly on the QueueMetrics server.

mysql -uroot -p	-> enter root password created above
  CREATE USER 'queuemetrics'@'%' IDENTIFIED BY '** Uniloader Password **';
  GRANT ALL PRIVILEGES ON queuemetrics . * TO 'queuemetrics'@'%';

There are two integration points for QueueMetrics into Asterisk being the Asterisk manager Interface (AMI) and queue_log file.

Logging Queue events needs to be enabled in logger.conf with:

queue_log = yes

Configure AMI Access

Add the following into Asterisk manager.conf

secret = ** password **
deny =
permit = ** QM Server IP Address **/  ; not needed for QM Live (hosted)
permit =	             ; <- This is necessary for access by the Unitracker for outgoing calls
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate

Perform module reload manager in Asterisk.

Uniloader and Unitracker Installation

The Uniloader dynamically pushes data from the queue_log file to the QueueMetrics Database. The Unitracker (incorporated within the Uniloader application), captures outgoing call events and other events e.g. Park, MoH from the AMI and also feeds them into the QueueMetrics database.

Download the uniloader file from: and extract the uniloader_amd64 file into /mnt/kd/bin (create if required).

The following init script /mnt/kd/bin/uniloaderd is used to start and stop the two processes:

init () {

start () {
  ## Add information as required ##
  echo "Starting uniloader and unitracker ..."
  nohup nice /mnt/kd/bin/uniloader -s /var/log/asterisk/queue_log upload --uri "mysql:tcp(** AstLinux IP Address **:3306)/queuemetrics?allowOldPasswords=1" \
  --login queuemetrics --pass ** Uniloader Password ** --token P001 >> /var/log/uniloader.log &
  nohup nice /mnt/kd/bin/uniloader track --host "** AstLinux IP Address **" --port "5038" --login queuemetrics --secret ** AMI Password ** --outboundcalls "1" --parkedcalls "1" >> /var/log/uniloader.log &

stop () {
  echo "Stopping uniloader and unitracker ..."
  killall uniloader >/dev/null 2>&1

case $1 in




  sleep 2

  echo "Usage: start|stop|restart"


Add /mnt/kd/bin/uniloaderd init to /mnt/kd/rc.local and /mnt/kd/bin/uniloaderd stop to /mnt/kd/rc.local.stop. Create if required!
Remember to make all the files executable.

View /var/log/uniloader.log for status and errors after completing the QueueMetrics Initial Setup below.

Update Configuration File

Update the XML configuration file /usr/local/queuemetrics/webapps/queuemetrics-18.04.1-493/WEB-INF/web.xml as follows:

          <param-value>** new license key **</param-value>
<param-value>jdbc:mariadb://;password=** Uniloader Password **&amp;sessionVariables=sql_mode=''&amp;autoReconnect=true</param-value>

Set up Database

Browse to QueueMetrics_Server_IP:8080/queuemetrics and you will be forwarded to the initial setup screen after an initial error screen.
Add the new root password, accept the agreements and Create Database. Note that the user credentials should have been populated from the web.xml config step above.

Update AMI in System Parameters

There may be a number of system parameters that are required for your installation however this one is always required.
Log into the QueueMetrics Web GUI with demoadmin:demo and select Edit System Parameters.
Update the following parameter:

callfile.dir=tcp:queuemetrics:** AMI Password**@** AstLinux IP Address **

Log out then back in again to update the settings

The configuration of QueueMetrics is not covered in the guide. Please see the QueueMetrics documentation found Here

To use the QueueMetrics Live Hosted Solution the start () section of the qloaderd init script has to be changed like this:

start () {
  ## Add information as required ##
  echo "Starting uniloader and unitracker ..."
  nohup nice /mnt/kd/bin/uniloader -s /var/log/asterisk/queue_log --cacert "/usr/lib/ssl/cert.pem" upload --uri "** Your QM instance name **" \
  --login webqloader --pass "<password of the wqloader QM user>"  >> /var/log/uniloader.log &
  nohup nice /mnt/kd/bin/uniloader track --host "" --port "5038" --login queuemetrics --secret "<AMI Password>" --outboundcalls "1" --parkedcalls "1" >> /var/log/uniloader.log &

at the end of this page you'll also find the changes needed for a hosted QM Live solution
  • userdoc/tt_queuemetrics.txt
  • Last modified: 2020/06/08 22:59
  • by mknill