[Asterisk-Users] Your thoughts..

WipeOut wipe_out at onetel.com
Fri Nov 14 04:13:09 MST 2003


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




More information about the asterisk-users mailing list