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.) 2. Are there any req's to making this work? (apart from, I assume, having the mysql client installed on the * box..) I also read in the archives that CDR logging could be done to a CSV file, How and where is this setup and configured? Thanks.. -- ______________________________________________ http://www.linuxmail.org/ Now with e-mail forwarding for only US$5.95/yr Powered by Outblaze
>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.)/asterisk/doc/cdr_mysql.txt>2. Are there any req's to making this work? (apart from, I assume, having >the mysql client installed on the * box..)not that i know of... it works fine on my default redhat installation>I also read in the archives that CDR logging could be done to a CSV file, >How and where is this setup and configured?CDR logging to CSV file is enabled by default - for more information see: /asterisk/README.cdr the logs are located in: /var/log/asterisk/cdr-csv duncan duncan
On Fri, 28 Mar 2003, 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.)The DB schema is in doc/cdr_mysql.txt but to make it easy I'll include it here: CREATE TABLE cdr ( calldate datetime NOT NULL default '0000-00-00 00:00:00', clid varchar(45) NOT NULL default '', src varchar(45) NOT NULL default '', dst varchar(45) NOT NULL default '', dcontext varchar(45) NOT NULL default '', channel varchar(45) NOT NULL default '', dstchannel varchar(45) NOT NULL default '', lastapp varchar(45) NOT NULL default '', lastdata varchar(45) NOT NULL default '', duration int(11) NOT NULL default '0', billsec int(11) NOT NULL default '0', disposition int(11) NOT NULL default '0', amaflags int(11) NOT NULL default '0', accountcode varchar(45) NOT NULL default '' );> > 2. Are there any req's to making this work? (apart from, I assume, having the mysql client installed on the * box..)I don't think you need the mysqlclient installed on the box, you just need the client libs. I haven't used the mysql cdr stuff so I can't really help here.> > I also read in the archives that CDR logging could be done to a CSV file, How and where is this setup and configured?by default CSV logging is enabled. You can find the logs (on a default install) in /var/log/asterisk/cdr-csv James
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
Not sure about 1. Haven't used cdr_mysql myself.... As far as 2, just load cdr_csv in your modules.conf. It logs to /var/log/asterisk/cdr-csv/Master.csv. --Mike On Friday, March 28, 2003, at 07: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.) > > 2. Are there any req's to making this work? (apart from, I assume, > having the mysql client installed on the * box..) > > I also read in the archives that CDR logging could be done to a CSV > file, How and where is this setup and configured? > > Thanks.. > -- > ______________________________________________ > http://www.linuxmail.org/ > Now with e-mail forwarding for only US$5.95/yr > > Powered by Outblaze > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Mike Reiling Systems & Network Administrator SoftCoin, Inc. 2000 Sierra Point Parkway Brisbane, CA 94005 650-624-3869 - P 650-624-3899 - F It might look like I'm doing nothing, but at the cellular level I'm really quite busy.
Don't forget to set the database permissions. These need to agree with whatever is in /etc/asterisk/cdr_mysql.conf. Iain --On Friday, March 28, 2003 3:14 pm +0000 "WipeOut ." <wipeout@linuxmail.org> 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.) > > 2. Are there any req's to making this work? (apart from, I assume, having > the mysql client installed on the * box..) > > I also read in the archives that CDR logging could be done to a CSV file, > How and where is this setup and configured? > > Thanks.. > -- > ______________________________________________ > http://www.linuxmail.org/ > Now with e-mail forwarding for only US$5.95/yr > > Powered by Outblaze > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >