[asterisk-users] update CDRs in mysql during a call

Scott L. Lykens slykens at verimedservices.com
Mon Oct 19 11:08:07 CDT 2009


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 


More information about the asterisk-users mailing list