CDR Analyser: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
New page: [http://www.areski.net/asterisk-stat-v2/about.php Asterisk-Stat] : CDR Analyser is a PHP WEB application allowing you to view CDR details and do custom searches. Let's start by installing...
 
No edit summary
Line 18: Line 18:
service httpd start
service httpd start
chkconfig httpd on
chkconfig httpd on
yum install php php-mysql
yum install php php-gd php-mysql
</pre>
</pre>



Revision as of 01:14, 10 October 2008

Asterisk-Stat : CDR Analyser is a PHP WEB application allowing you to view CDR details and do custom searches.

Let's start by installing all the prerequiste programs and tools.

Add indexing to some fields for the Asterisk Databse.
Replace asterisk-cdr with your databse name and replace cdr with your table name.

mysql
use asteirsk-cdr
ALTER TABLE `cdr` ADD INDEX ( `dst` );
ALTER TABLE `cdr` ADD INDEX ( `accountcode` );
exit

Install WEB services and PHP.

yum install httpd
service httpd start
chkconfig httpd on
yum install php php-gd php-mysql


Download and extract Asterisk-Stat

cd /var/www/html
wget http://www.areski.net/asterisk-stat-v2/asterisk-stat-v2_0_1.tar.gz
tar xvzf asterisk-stat-v2_0_1.tar.gz
mv asterisk-stat-v2/ cdr/

Edit the configuration file.

vi /var/www/html/cdr/lib/defines.php

Change the first to define statements to suite

define ("WEBROOT", "http://asterisk.klaverstyn.com/stat/");
define ("FSROOT", "/var/www/html/cdr/");

Change the databse connection details

define ("HOST", "localhost");
define ("PORT", "5432");
define ("USER", "username");
define ("PASS", "password");
define ("DBNAME", "asteirsk-cdr");
define ("DB_TYPE", "mysql"); // mysql or postgres

Change the table name if required

define ("DB_TABLENAME", "cdr");