Chuck,

I've never added records to my cdr table but this shld be very easy to do.

Few things you need to do:

Check how/if the BCM data would map to the Astersk CDR data. I have no idea what the BCM data looks like.

Here is the format of the CDR table
mysql> show columns from cdr;
+-------------+--------------+------+-----+---------------------+-------+
| Field       | Type         | Null | Key | Default             | Extra |
+-------------+--------------+------+-----+---------------------+-------+
| calldate    | datetime     |      |     | 0000-00-00 00:00:00 |       |
| clid        | varchar(80)  |      |     |                     |       |
| src         | varchar(80)  |      |     |                     |       |
| dst         | varchar(80)  |      |     |                     |       |
| dcontext    | varchar(80)  |      |     |                     |       |
| channel     | varchar(80)  |      |     |                     |       |
| dstchannel  | varchar(80)  |      |     |                     |       |
| lastapp     | varchar(80)  |      |     |                     |       |
| lastdata    | varchar(80)  |      |     |                     |       |
| duration    | int(11)      |      |     | 0                   |       |
| billsec     | int(11)      |      |     | 0                   |       |
| disposition | varchar(45)  |      |     |                     |       |
| amaflags    | int(11)      |      |     | 0                   |       |
| accountcode | varchar(20)  |      |     |                     |       |
| uniqueid    | varchar(32)  |      |     |                     |       |
| userfield   | varchar(255) |      |     |                     |       |
+-------------+--------------+------+-----+---------------------+-------+
16 rows in set (0.00 sec)


To find out your mysql connection parameters to CDR access look in /etc/asterisk/cdr_mysql.conf


What I usually use to load flat file data into a database is a perl CGI, that allows you to upload the file. Then load the data into a temporary db table, and either import it into the main table or do some further manipulation before importing into the main table if required.

These Perl modules will make this pretty easy:
CGI - HTTPD Interface
Text::Delimited - or parsing delimited text files
DBI - Database interface
DBD::mysql - mysql database driver

Hope this helps a bit,

Mike

--
Mike Ashton

Quality Track Intl

Ph:     647-722-2092 x 301
Cell:   416-527-4995
Fax:    416-352-6043

QTI CONFIDENTIAL AND PROPRIETARY INFORMATION

The contents of this material are confidential and proprietary to Quality Track 
 International, Inc.
and may not be reproduced, disclosed, distributed or used without the express 
permission of an authorized representative of QTI.
Use for any purpose or in any manner other than that expressly authorized is 
prohibited.
If you have received this communication in error, please immediately delete it 
and all copies, and promptly notify the sender.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to