The best accuracy for storing call duration in database which is available in Smartswitch - is second-wise.
Second-wise accuracy is available in CDR for all calls which passed through the system.
Also for all calls which passed through the Billing, the call duration in minutes is stored in database which is calculated basing on Billing increment.
When performing Billing re-calculation the call duration in minutes is re-calculated again basing on Billing increment and call duration in seconds.
However 1 second is not the smallest atom for call duration measurement.
1 second consists of 1000 millisconds, and 1 millisecond consists of 1000 microseconds etc.
Here from arises an question of choosing duration rounding mode.
For example, call started at 15 sec. 300 ms, and finished at 25 sec. 900 ms.
Duration could be calculated only on second-basis as 25 - 15 = 10 sec.
Or duration could be calculated as 25.800 - 15.300 = 10.500 sec, and next could be rounded to 10 or 11 sec.
On the first sight the question of rounding of 1 second is not significant and could be forget.
However on big amounts of telephony traffic the difference in rounding between billing systems might give significant money amounts when performing settlement with partners.
Therefore it's very desirable to use the same method of duration rounding for both partners.
The difference in call duration could also happen due to VoIP network latency.
For example, originator has hanged up the call and send a message of call hangup to you, but this message arrived on your server only in 500ms.
Smartswitch has following duration rounding methods available:
Call start time and call end time are first rounded to smaller second.
Then, to get call duration, call end time is deducted from call start time.