Gentlemen! Telemarketers!! - RELEASE THE PHONE SPIDERS!!! (Dr Weird - of AquaTeen Hungerforce )
Seriously, thank you all for the excellent suggestions. I will try them both and present them to the client. Nice to have some helpful folks! Glen Ryan Wagoner said the following on 5/22/2010 11:39 AM: > On Sat, May 22, 2010 at 11:28 AM, Gordon Henderson > <gordon+aster...@drogon.net> wrote: > >> On Sat, 22 May 2010, GlenM wrote: >> >> >>> Hello Folks; >>> >>> I have a dilemma: >>> >>> I have a client with Asterisk 1.4x and he needs to have a record of all >>> incoming calls - caller ID and date/time is sufficient. Since I am not >>> an Asterisk wizard, I am doing it this way. >>> >>> I set a cron job to tailf the last 10 lines of the Master.csv file and >>> package those nicely in an email. However, I can see some inefficiencies >>> in this. Main one is what if there are more than 10 incoming calls >>> between cron runs? >>> >>> So, questions: >>> >>> 1. has anyone done this? >>> 2. is there a better way? >>> 3. if so, can you 'skool' me ? >>> >> AIUI, Asterisk opens for append the Master.csv file, (fopen (... "a")) >> which creates the file if it doesn't existis.. writes a line to it then >> closes it for each CDR recorded, so ... >> >> You can rename the Master.csv file then email the file then delete it... >> >> Pseudocode: >> >> Once every 10 miuntes from cron: >> >> if Master.csv does not exist, then exit // No calls >> >> rename Master.csv work.csv >> sleep 1 >> process and email work.csv to whoever >> delete work.csv >> exit >> >> The sleep may not be needed, but it won't do any harm in the event that >> you rename the file after asterisk opens it but before it writes the line >> into and closed it. >> >> And instead of deleting the work.csv you could append it to some other >> file for a permanent log... >> >> Gordon >> >> -- >> > > I use asterisk-addons with mysql to store cdr data. I process this > data and insert it into the companies call database link to users, you > could just email it. I basically added a column to mysql and mark each > row as processed. > > Ryan > > -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users