Asternic CDR reports is a call detail records reporting solution for the open source Asterisk© PBX. In order to use the software you must have a working Asterisk PBX with CDR records stored in a MySQL database. Most popular distributions for Asterisk store CDR on a MySQL database by default.
Asterisk is a powerful and complex software. You won't find instructions on setting up Asterisk itself here. If you are new to Asterisk and VoIP and want to get started, an easy and quick way is to install one Asterisk based Linux distribution like Elastix, PBXinaFlash, AsteriskNow, etc. Any of these distributions will install a complete Linux system with Asterisk and a web fronted for configuring it.
Once you have Asterisk working you can install Asternic CDR Reports to get the best of breed CDR reporting available for it. Don't take our word for it. Download it and see it for yourself.
Asternic CDR Reports is a PHP application, encoded with Ioncube. There are certain requirements to be met in order to successfully run the software
On the server side you need:
- A web server (Apache/Nginx)
- 32 or 64 bits Linux Operating System
- PHP 5.2 or above
- MySQL Server 5 or above
- Ioncube Loader
If you have PHP 5.1 it might work, but you will have to be sure some modules are installed, like php-pecl-zip
We recommend to use PHP 5.2 or higher if you can.
You access rerpots using your web browser. For a full experience you have to use a modern one:
- Modern Web Browser (IE8 or above, Google Chrome, Safari, Firefox)
In order to listen to recordings directly on the browser, you must have Adobe Flash Player installed and working in your browser. Without it you won't be able to listen to call recordings, but you will be able to download them and listen directly in your Operating System.
Getting the software
You can see available downloads in http://www.asternic.net/cdrreports/download.php. Asternic CDR Reports requires an activation code, you can purchase a license to get a perpetual activation code, or you can request a 30 days trial code for testing it out before buying.
You also have the choice of installing the open source Lite version of our software. It is important to note that it is not the same software as the commercial version. Database schemas differ and installation instructions are also different. There is another installation guide for the free IssabelPBX module that you can find here.
So, log into your server and run this from your server command line:
cd /usr/src wget http://download.asternic.net/asternic-cdr-1.1.0.tgz
Once the download finishes, extract the package:
tar zxvf asternic-cdr-1.1.0.tgz
Then change to the newly extracted directory that contains all files:
You must know beforehand the MySQL root password in order for the installation to succeed. The auxiliary tables need to be created, and you must enter that password when prompted. Otherwise, installation will be partial and non working.
And finally start the installation script:
If you use some trimmed down distributions, the
makecommand might not be installed by default. In the case that the above command throws a command not found error, you will need to install the
makeutility and try again. (This is not needed if you do not receive any command not found errors). To install
yum -y install make
The installation script will do several things:
- Check if the software is already installed, if so it will abort and exit
- It will install the ionCube loader for your platform and PHP version
- It will create MySQL tables in the asteriskcdrdb database
- It will install the web application in /var/www/html/cdrstats
When installing on systems with popular Asterisk© configuration GUI, like Issabel, you do not need to configure anything special. It will just work. However, if you do not use any of those or you have a vanilla Asterisk setup, then you will have to enter MySQL credentials into the config file located in /var/www/html/cdrstats/config.php
define('USE_BACKEND_AUTH',true); // This database parameters are only needed if you are not using // a supported configuration GUI for Asterisk. Most of them are supported. // If any of the above systems config files is found, connections details // on those config files will be used instead of what you set manually here $DBHOST="localhost"; $DBUSER="mysqluser"; $DBPASS="mysqlpassword"; $DBNAME="asteriskcdrdb"; $TABLENAME="cdr"; $DEBUG=false;
Activating the License
In order to run reports, you need a valid activation code to get your license, either a trial or purchased one. Once you have your code at hand, use your browser and go to:
You should be prompted for both the activation code, and a registration name. The registration name can be chosen by you and it could be your company name, customer name, etc. A legend will appear in the reports footer saying "Licensed to XXXXX" where XXXXX is the registation name you used at time of activation. That name cannot be changed in the future, so please chose wisely.
Afer entering both the activation code and registration name, click the button to acquire a license file. That's it! After a short while, you will be presented with the login form. The default user/pass to access the system is: admin/admin . You can change the password once logged by selecting the Setup/Users menu inside Asternic GUI.
Continue reading the Administrator Guide in order to configure or set preferences for your reports.
Recordings and FreePBX
Asternic CDR Reports can be configured to listen/download to recordings if they are stored in the CDR tables already. Different backends might use different ways to store that meta data. In this article we will describe the needed settings to make recordings availabe with FreePBX version 12 and up.
Log as an administrator into Asternic CDR Reports PRO by pointing your browser to http://your.server/cdrstats and select Setup / Preferences from the menu.
Once there be sure to add the following settings:
keyword: recording_field parameter: value: recordingfile
The above settings indicates that the filename for the recording is to be foudn on the recordingfile field on the CDR table.
keyword: recordings_path parameter: value: /var/spool/asterisk/monitor/%Y/%m/%d
The above setting will instruct Asternic to find the recording file over the directory /var/spool/asterisk/monitor and the YEAR / MONTH / DAY subdirectories.
keyword: recordings_basedir parameter: value: /var/spool/asterisk/monitor
This one is there for security reasons, to not let downloads outside from /var/spool/asterisk/monitor to happen.
With those settings in place, you will see icons to play/download recordings if they are available on your system.
Uninstalling the Software
In case you want to remove all related files and services, asuming you installed via the make install command, follow these steps:
rm -rf /var/www/html/cdrstats
mysqladmin -u root -p asteriskcdrdb 'drop table acdrchannels' mysqladmin -u root -p asteriskcdrdb 'drop table acdrcost' mysqladmin -u root -p asteriskcdrdb 'drop table acdrnormalisationrules' mysqladmin -u root -p asteriskcdrdb 'drop table acdrrates' mysqladmin -u root -p asteriskcdrdb 'drop table acdrsetup' mysqladmin -u root -p asteriskcdrdb 'drop table acdruserchannel' mysqladmin -u root -p asteriskcdrdb 'drop table acdruserfilter' mysqladmin -u root -p asteriskcdrdb 'drop table acdrusers'
And that's it.