i am looking to have a nice view of the CDRs of my system.
i am running asterisk 11.4 and i do not have any SQL databases for storing CDRs. All of my CDRs are on /var/log/asterisk/cdr-csv/Master.csv
I would not like to use any databases on that system.
is there a nice way to present the Master.csv file, even in a browser?
I did a google search and i found this csvviewer.com/. But I don’t understand why you don’t use MySQL CDR Backend. If you are looking to see the CDR in the Webrowser you can store it in a MySQL CDR Backend and then query the DB using PHP.
thanks a lot for the reply.
i am not familiar with the mysql in asterisk.
i would like to give it a try if you have a howto
There is a native MySQL CDR module.
To use it, configure the module in cdr_mysql.conf. Create a table called cdr under the database name you will be using the following schema.
CREATE TABLE cdr (
calldate datetime NOT NULL default ‘0000-00-00 00:00:00’,
clid varchar(80) NOT NULL default ‘’,
src varchar(80) NOT NULL default ‘’,
dst varchar(80) NOT NULL default ‘’,
dcontext varchar(80) NOT NULL default ‘’,
channel varchar(80) NOT NULL default ‘’,
dstchannel varchar(80) NOT NULL default ‘’,
lastapp varchar(80) NOT NULL default ‘’,
lastdata varchar(80) NOT NULL default ‘’,
duration int(11) NOT NULL default ‘0’,
billsec int(11) NOT NULL default ‘0’,
disposition varchar(45) NOT NULL default ‘’,
amaflags int(11) NOT NULL default ‘0’,
accountcode varchar(20) NOT NULL default ‘’,
uniqueid varchar(32) NOT NULL default ‘’,
userfield varchar(255) NOT NULL default ‘’
);
In 1.8 and later
The following columns can also be defined:
peeraccount varchar(20) NOT NULL default ''
linkedid varchar(32) NOT NULL default ''
sequence int(11) NOT NULL default '0'
make sure you have the cdr_mysql.so module available on your system.
Run this command and you should get an output similar to this :
root@PBX:~# ls /usr/lib/asterisk/modules/ | grep mysql
app_mysql.so
cdr_mysql.so
res_config_mysql.so