All, According to my readings CDRs are stored at the end of the call. My concerns is when asterisk goes down (I know that it's never happen but it's just in case) or when the is a power shutdown of the server. then CDRs are not stored in mysql. is there a way to store periodially CDR during a call, and set the periodical timer regarding the context. if no is there a way to retreive CDR, after a reboot ? Regards Mickael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091019/7eca7f7a/attachment.htm
You could do a ForkCDR to get a CDR recorded. In the event of a crash, you would only have the fork'ed CDR; for most calls you would have two entries. _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of mickael ropars Sent: Monday, October 19, 2009 10:48 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] update CDRs in mysql during a call All, According to my readings CDRs are stored at the end of the call. My concerns is when asterisk goes down (I know that it's never happen but it's just in case) or when the is a power shutdown of the server. then CDRs are not stored in mysql. is there a way to store periodially CDR during a call, and set the periodical timer regarding the context. if no is there a way to retreive CDR, after a reboot ? Regards Mickael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091019/22d937e9/attachment.htm
Apologies for the top post - Outlook really is braindead with HTML email. I've been thinking about this problem for a project I am working on and what I think I am going to do is create a table that I insert a record into just before the dial statement that includes where the call is going then remove that record when the call completes and the CDR posts. If asterisk crashes I know what time it crashed and then can rate the calls based on when the call started and when asterisk crashed.... And likely not charge for calls under a short duration (say 30-45s) assuming they either never got connected or were so short as to be useless. Such a method could be modified so that on restart a script is triggered which would automatically process the "in-progress" table into CDR so your standard suite of tools could use the data later on. Probably not perfect but that's what I've thought of with it. sl From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of mickael ropars Sent: Monday, October 19, 2009 11:48 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] update CDRs in mysql during a call All, According to my readings CDRs are stored at the end of the call. My concerns is when asterisk goes down (I know that it's never happen but it's just in case) or when the is a power shutdown of the server. then CDRs are not stored in mysql. is there a way to store periodially CDR during a call, and set the periodical timer regarding the context. if no is there a way to retreive CDR, after a reboot ? Regards Mickael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091019/5d717869/attachment-0001.htm
On Mon, 19 Oct 2009, mickael ropars wrote:> According to my readings CDRs are stored at the end of the call. My > concerns is when asterisk goes down (I know that it's never happen but > it's just in case) or when the is a power shutdown of the server. then > CDRs are not stored in mysql. is there a way to store periodially CDR > during a call, and set the periodical timer regarding the context.In my application, each context represents a different "product." Each product is billed at separate rates. I use "resetcdr(w)" at the start of each context to log the time spent in the previous context. At the end of the call, I add up how much time was spent in each product and rate the call. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000