]> git.ipfire.org Git - thirdparty/asterisk.git/commit
funcs/func_cdr: Correctly report high precision values for duration and billsec 44/2044/3
authorMatt Jordan <mjordan@digium.com>
Mon, 18 Jan 2016 23:16:24 +0000 (17:16 -0600)
committerMatt Jordan <mjordan@digium.com>
Wed, 20 Jan 2016 14:11:44 +0000 (08:11 -0600)
commit3b9cba4294c0ace7a337fdce299d9d4796236cab
tree561a29bc40bac2e9f95be9bfc37bd23dbf17903d
parent9fa76ba215ebe3ac225f2dd37f16942caf4e7e63
funcs/func_cdr: Correctly report high precision values for duration and billsec

When CDRs were refactored, func_cdr's ability to report high precision values
for duration and billsec (the 'f' option) was broken. This was due to func_cdr
incorrectly interpreting the duration/billsec values provided by the CDR engine
in milliseconds, as opposed to seconds. Since the CDR engine only provides
duration and billsec in seconds, and does not expose either attribute with
sufficient precision to merely pass back the underlying value, this patch fixes
the bug by re-calculating duration and billsec with microsecond precision based
on the start/answer/end times on the CDR.

ASTERISK-25179 #close

Change-Id: I8bc63822b496537a5bf80baf6102c06206bee841
funcs/func_cdr.c