Installing Asternic Call Center Stats PRO on a separate server

Howto


Asternic Call Center Stats PRO is a networked application. As such it can be installed on the same server where Asterisk resides, or it can be installed on a standalone/separate server also. This guide will use as an example the following IP addresses:

  • Asterisk Server: 192.168.10.1
  • CCStats Server: 192.168.10.10

When installing on a remote/standalone server, there are some complications/gotchas to take into consideration: f you want to make recordings available via Asternic Web reports, you won’t be able to do so via standard tools/scripts, as the recordings will be stored on a different server than Asternic CCStats web server. This can be fixed if you mount the appropriate directories via NFS or similar, or if you modify the post recording script to move the recording files to the Asternic Server. These steps are not covered in this guide. :

Installation

On the standalone server:

Download the software, extract it and instead of running “make install”, you will have to chose what components to install:

cd /usr/src
wget http://download.asternic.net/asternic-stats-pro-2.3.11.tgz
tar zxvf asternic-stats-pro-2.3.11.tgz
cd asternic-stats-pro-2.3.11
make precheck ioncube mysql setpassword webfiles pdf sqlupdate perlfinal

That will install the web application and database into your new server.

You need to now allow remote MySQL connections to this server. Assuming that your Asterisk box IP address is 192.168.10.1, run the following commands:

mysql -u root -p -e "grant ALL PRIVILEGES on qstats.* to qstatsUser@192.168.10.1 identified by 'qstatsPassw0rd'"

On some recent MySQL or MariaDB versions you might also need to grant super privileges like this:

mysql -u root -p -e "grant super on *.* to qstatsUser@192.168.10.1 identified by 'qstatsPassw0rd'"

Finally, you might want to log as the “admin” user to Asternic via your browser, then go to Setup / AMI Servers, and edit the Local entry changing localhost to the IP address of your Asterisk box, in this example guide it should be something like this:

Server: 192.168.10.1
Username: asternic
Secret: asternic222

On the Asterisk server:

Now, you need to install the log processing agent onto the Asterisk server itself, so, download the software again, extract it and run:

cd /usr/src
wget http://download.asternic.net/asternic-stats-pro-2.3.11.tgz
tar zxvf asternic-stats-pro-2.3.11.tgz
cd asternic-stats-pro-2.3.11
make parselog asterniclog perlfinal asterniclogrestart

Then you need to create a Manager user that will be allowed to connect from the remote (Asternic) server. For doing so, edit the file /etc/asterisk/manager_custom.conf with contents similar to this:

[asternic]
secret = asternic222
deny = 0.0.0.0/0.0.0.0
permit = 127.0.0.1/255.255.255.0
permit = 192.168.10.10/255.255.255.0
read = all
write = all
writetimeout = 1000
eventfilter=!Event: RTCP*
eventfilter=!Event: VarSet
eventfilter=!Event: Cdr
eventfilter=!Event: DTMF
eventfilter=!Event: AGIExec
eventfilter=!Event: ExtensionStatus
eventfilter=!Event: ChannelUpdate
eventfilter=!Event: ChallengeSent
eventfilter=!Event: SuccessfulAuth

Notice that we are allowing (permit) connections from 192.168.10.10 IP address. You can of course change the password to something different, if you do, be sure to set it accordingly inside Asternic - Setup/AMI servers

Once that you add this, reload the manager configuration in asterisk with this comamnd:

asterisk -rx "manager reload"

Finally you need to modify the asterniclog daemon options to point to the remote CCStats PRO server, so go ahead and edit the file /etc/sysconfig/asterniclog with your favourite text editor so it looks like this:

OPTIONS="-u qstatsUser -p qstatsPassw0rd -d qstats -h 192.168.10.10 -l /var/log/asterisk/queue_log -c --daemon"

Once that is done, restart the service:

service asterniclog restart