I'm in the beginning of development for billing on my FS instance.
Currently I'm just in the log-rotation and uploading of the .csv-files stage.
I'm having trouble understanding completely how this should work, to be "bullet-proof" in a production environment.
I've read the "Example Perl Script for CDR into MySQL" in
http://wiki.freeswitch.org/wiki/Mod_cdr_csv.
What I would like to accomplish is uploading the Master.csv-file to another server, which should take care of all the billing, so it doesn't interfere with the VoIP-server.
But how can I make sure, that when I'm uploading the Master.csv file, that FS isn't currently writing to the file as well.
I'm thinking of moving the Master.csv to Master-YYYY-MM-DD-HH-MM.csv every minute and then uploading those files to another server.
But then again, how can I make sure, that when moving the file to Master-YYYY-MM-DD-HH-MM.csv that FS isn't writing to the file?
Can someone share some light on this matter?