<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi Arto,</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Second-precision does not imply "differences are always
positive". If a call starts at second offset 1.999 and ends at 2.000,
it will have incorrectly lasted 1 second instead of 0 seconds.
Conversely, if it starts at second offset 2.000 and ends at
2.999, the duration will be 0 seconds, instead of 1.</tt></p>
<p><tt><br>
</tt></p>
<p><tt>In other words, the expected error of the "duration" column
is anything between [-0.(9), +0.(9)] seconds. If this is not
enough for you, you should only make use of "ms_</tt><tt>duration",
which has an expected error of </tt><tt><tt>[-0.(9), +0.(9)]
milliseconds.</tt></tt></p>
<p><tt><tt><br>
</tt></tt></p>
<p><tt><tt>I hope this clears things up,<br>
</tt></tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 30.04.2018 13:57, Arto Kuiri wrote:<br>
</div>
<blockquote type="cite"
cite="mid:HE1P189MB0412695FBAB8253EDD8EB2539E820@HE1P189MB0412.EURP189.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<div>Hi,<br>
<br>
I have noticed n accounting module that there seems to be
differences between cdr fields "duration" and "ms_duration".<br>
<br>
You can notice it even from opensips documentation:<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Tutorials-Advanced-Accounting#toc11">http://www.opensips.org/Documentation/Tutorials-Advanced-Accounting#toc11</a><br>
<br>
If you check CDR example:<br>
ACC: call ended:
created=1474639265;call_start_time=1474639281;\<br>
<br>
duration=5;ms_duration=4250;setuptime=16;method=INVITE;from_tag=1515466979;\<br>
to_tag=1284910.0.0.1351;call_id=1766189979;code=200;reason=OK<br>
<br>
ms_duration= 4250 and still duration field is 5, although it
should be 4 ? <br>
<br>
I first thought that it could be that duration is rounded up,
but we have cdr's where duration is rounded down,
<br>
like ms_duration 1926 => duration 1. <br>
<br>
Any idea why it behaves like that?<br>
<br>
Regards,<br>
Arto Kuiri<br>
<br>
<br>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>