Do it with MySQL CDR and you should avoid all of those issues; just add a 
field to store the cost to the schema and compute it whenever makes sense.

Dave

=====================================================================
David C. Troy   [EMAIL PROTECTED]                   410-384-2500 Sales
ToadNet - Want to go fast?                        410-544-1329 FAX
570 Ritchie Highway, Severna Park, MD 21146-2925  www.toad.net

On Fri, 14 Nov 2003, WipeOut wrote:

> I need to get your thoughts on something.. :)
> 
> I am trying to create a system to process the CDR call logs for 
> department accounting..
> 
> I think there are two ways of doing it.. Either I can create an AGI that 
> will run on the "h" extension and will lookup the last entry that 
> matches the account code of the call that just ended in the MySQL CDR 
> and calculate the call cost immediately..
> Or
> I can use a cron job say every 5 mins to move the Master.csv file to a 
> temporary location and then process all the lines in the csv and put the 
> results into the DB and then delete the Master.csv from that temporary 
> location..
> 
> Which way will be better in terms of reliability and performance?
> 
> What will the issues be if the Master.csv is being updated at the exact 
> moment my cron job tries to move it? is there any file locking or a 
> method of delaying Asterisk's write or the cron's move operation till 
> the file is availible?
> 
> Thanks for you thoughts..
> 
> Later
> 
> _______________________________________________
> Asterisk-Users mailing list
> [EMAIL PROTECTED]
> http://lists.digium.com/mailman/listinfo/asterisk-users
> 

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to