Implementando CDR asterisk

1 – apt-get install mysql-server, libmysqlclient15-dev
2 – Compilar o asterisk-addons:
./configure
make
make install
make samples
3 – Configurar o /etc/asterisk/cdr_mysql.conf para conextar no asterisk
[global]
hostname=127.0.0.1
dbname=asteriskcdrdb
table=cdr
password=senha
user=root
port=3306
userfielt=1

4 – Fazer download da tabela pronta cdr.sql
Após intruduzir no mysql:
mysql -u root -p RELATORIO

8 – Copiar o conteúdo do asterisk stats para /var/www/
cp * /var/www -r

9 – Comentar a linha do cdr.php (/var/www/) onde se diz session_start();

10 – Editar o arquivo defines.php (/var/www/lib/defines.php)
Edit defines.php e alterar os parametros de acordo com sua necessidade.

define (“WEBROOT”, “http://192.168.254.254/relatorio/”);
define (“FSROOT”, “/var/www/html/relatorio/”);

FSROOT: This is the server path which contain the application.
Example: /home/users/asterisk-stat/
HOST: 127.0.0.1
Example: localhost
PORT: 3306
Example: 5432
USER: root
Example: username
PASS: Database password of the user.
Example: password
DBNAME: asteriskcdrdb
Example: asteriskcdr
DB_TYPE: mysql
support: mysql and postgres
DB_TABLENAME: Table of the database containing the CDR.
Example: cdrtable
appli_list: PHP array used to associate extension to a name. This can be useful if you want to give more signification during the CDR browsing
$appli_list[‘4677’]=array(“Voicemail”);
$appli_list[‘6544’]=array(“Conference-MeetMe”);

11 – Entre no browser e teste. :)

NO FREEBSD e CENTOS tive que alterar dois parametros no php.ini
short_open_tag = On
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

Deixe um comentário