Hey,
On 10.08.2011 14:21, Daniel-Constantin Mierla wrote:
it seems that is some parts of the world it is
required to have call
duration with two decimals precision. By default acc module does the
timestamp in seconds.
Thinking of adding an option to save the milliseconds, I see two option:
- a new column to store the milliseconds part as integer
- a new column to store the seconds.milliseconds as double
For those using various billing engines, what would be easier to digest
when rating the CDRs?
Maintaining two columns for duration book-keeping seems cumbersome to
me, I'd rather have a single column. In those cases where I don't need
the milliseconds portion I just cut it off or round it. It's certainly
easier to do than adding and converting values from two distinct columns
(meaning more complex database queries) to achieve milliseconds
precision, which is the more common case to me.
There is already the option of doing db extra column
to store $TV(Sn),
but this value is stored in a string (varchar) format, giving a little
more troubles to convert to numeric format before being able to compute
duration, so it might just worth doing the C coding to store in right
data type.
Storing numerical values right away looks like The Right Thing to do.
Cheers,
--Timo