We are using CDR for billing and we are now comparing billing information from Asterisk CDR and billing information bringed by our PSTN operator.
We have to face a minor but critical issue regarding the billsec value accuracy.
For some calls, the billsec value bringed by the operator is 1s more than the billsec value reported by Asterisk in CDR.
On the PSTN operator side, the billing process charges any second that has been initiated. Meaning that for a call that took (billsec) 62.3 s (62 s and 300 ms) the operator will report and charge a billsec value of 63.
At the same time, it looks like (as I can read in the source code) Asterisk is not managing ms in call timestamps… and therefore in the billsec calculation process (I undestand that billsec = hangup timestamp in sec - answer timestamp in sec). Meaning that for the call that took 62.3s, the billsec value reported will be 62 or 63, depending on the rounding process that have been applied on the call timestamps…
Also, is there any workaround or addon patch that can be applied on Asterisk in order to :
- manage call timestamps in ms, and
- get billsec in ms or control the billsec rounding rule ?
Thanks for any response.