[Asterisk-Users] CDR ??
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri Mar 28 09:08:59 MST 2003
On Friday 28 March 2003 09:14 am, WipeOut . wrote:
> Hi,
>
> I see in /ect/asterisk there is a cdr_mysql.conf to configure the
> CDR logging to a MySQL DB..
>
> I have a couple of questions..
>
> 1. Where do I find the DB schema to create the DB? (may be a good
> idea to add this to the top of the .conf file in the cvs so that it
> is easy to find for amyone wanting to set it up.. Just a thought.)
Here's the essential structure. You're welcome to add indexes and
additional fields (and reorder fields), as necessary. You should NOT
change the names of any of these fields:
CREATE DATABASE asteriskcdrdb;
CREATE TABLE asteriskcdrdb.cdr (
calldate datetime,
clid char(80),
src char(80),
dst char(80),
dcontext char(80),
channel char(80),
dstchannel char(80),
lastapp char(80),
lastdata char(80),
duration int(2),
billsec int(2),
disposition int(2),
amaflags int(2),
accountcode char(40)
);
> 2. Are there any req's to making this work? (apart from, I assume,
> having the mysql client installed on the * box..)
The shared library libmysql needs to be installed (will be installed
if you have the client).
> I also read in the archives that CDR logging could be done to a CSV
> file, How and where is this setup and configured?
I don't think you can turn it off. The CSV log is at
/var/log/asterisk/cdr-csv/Master.csv
-Tilghman
More information about the asterisk-users
mailing list