[asterisk-bugs] [Asterisk 0016559]: [patch] Duration and Billsec Decimal Place

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 13 19:40:17 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16559 
====================================================================== 
Reported By:                cianmaher
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16559
Category:                   Addons/cdr_addon_mysql
Reproducibility:            have not tried
Severity:                   feature
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.6.2.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-06 14:22 CST
Last Modified:              2010-01-13 19:40 CST
====================================================================== 
Summary:                    [patch] Duration and Billsec Decimal Place
Description: 
My problem at present is I has Sangoma ss7 box, woomera, asterisk1.6.2 and
addons 1.6.2 on a server that is connected to 8 ss7 trunks with other
carriers. I have asterisk writing cdr's to mysql however it appears to
round up always. 

For example:

One of the Carriers reports a call duration of 31.7seconds but we report
it as 33seconds assuming because there is some transit duration of approx
0.4 - 0.5 of a second which brings me to 32.1 or 32.2 but then it is
rounded up to 33.

My questions are:

* Is it possible for asterisk not to round the duration and billsec?
* Is it possible to show duration and billsec with a decimal to show the
true figure?

Thanks in advance

====================================================================== 

---------------------------------------------------------------------- 
 (0116644) tilghman (administrator) - 2010-01-13 19:40
 https://issues.asterisk.org/view.php?id=16559#c116644 
---------------------------------------------------------------------- 
1) Don't forget duration in func_cdr.c.  You only have billsec in there
presently.  In fact, you seem to have neglected "duration" everywhere but
in the documentation.
2) For cdr_mysql, the type can also be "decimal".
3) I would eschew the change of cdr_odbc.  This change is more appropriate
for cdr_adaptive_odbc, which will eventually replace cdr_odbc.
4) If you insisted on cdr_odbc, note that you cannot use SQL_C_SLONG with
a float type.
5) cdr_tds does not appear to have any change at all, other than the
addition of a comment.  Oversight?
6) Ditto 5 for cdr_sqlite3_custom.

Once you've made these changes, I'd like to see this patch go up on
reviewboard, where we can get more critical comments for improving the
code. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-13 19:40 tilghman       Note Added: 0116644                          
======================================================================




More information about the asterisk-bugs mailing list