I used something like this... LOAD DATA INFILE '/tmp/cdr.csv' INTO TABLE cdr FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' (accountcode, src, dst, dcontext, clid, channel, dstchannel, lastapp, lastdata, calldate, pickup, hangup, duration, billsec, disposition, amaflags);
I had to add the pickup and hangup columns to get it to import. I'm sure there was a way around this, but I'm not very good with SQL. I used the same format as used for the calldate column. I then dropped the pickup and hangup columns once the data was imported. For information on how to setup the DB go here. http://www.voip-info.org/wiki-Asterisk+cdr+mysql -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Wall Sent: Tuesday, June 08, 2004 3:07 PM To: [EMAIL PROTECTED] Subject: [Asterisk-Users] MySQL I have been lookin for someplace to lean how to dump all of the call transactions into a sql database. Can anyone provide me any assistance? _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users