Hi Scott and Danny,<br><br>thanks a lot for your quick answer.<br><br>Danny, Fork will generate too many CDRs if the call goes long. So it's not appropriate to my billing application.<br><br>Scott, I want to write the same application and I begin to so (that's why I wanted to know if there was the same appkication on asterisk before). my application has the behaviour than yours exept taht the end of the call is not set to the time crash, my application works as ticket (like prepaid application). at the begining of the call I open a ticket (I create a CDR with 5 second of communication for exemple). and every 5 seconds I update the CDR for a new ticket)<br>
<br>then I don't need to know what time the server crash.<br><br>I hope that you understand the way I will do it. what do you think about ?<br><br>thanks<br><br>regards<br><br>Mickael<br><br><br><div class="gmail_quote">
2009/10/19 Scott L. Lykens <span dir="ltr"><<a href="mailto:slykens@verimedservices.com">slykens@verimedservices.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Apologies for the top post – Outlook really is braindead
with HTML email.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Probably not perfect but that’s what I’ve thought of
with it.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">sl</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">
<div>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>
[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>mickael
ropars<br>
<b>Sent:</b> Monday, October 19, 2009 11:48 AM<div class="im"><br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br>
<b>Subject:</b> [asterisk-users] update CDRs in mysql during a call</div></span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">All,</p><div><div></div><div class="h5"><br>
<br>
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.<br>
<br>
if no is there a way to retreive CDR, after a reboot ?<br>
<br>
Regards<br>
<br>
Mickael<br>
<br>
</div></div>
</div>
</div>
</div>
<br>_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
AstriCon 2009 - October 13 - 15 Phoenix, Arizona<br>
Register Now: <a href="http://www.astricon.net" target="_blank">http://www.astricon.net</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>