[asterisk-bugs] [JIRA] (ASTERISK-25179) CDR(billsec, f) and CDR(duration, f) report incorrect values
ServTelAr (JIRA)
noreply at issues.asterisk.org
Tue Jan 19 10:22:33 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229069#comment-229069 ]
ServTelAr commented on ASTERISK-25179:
--------------------------------------
It shows 4 warnings:
[2016-01-19 13:15:39.870] DEBUG[6917]: pbx.c:4584 ast_str_substitute_variables_full: Evaluating 'CDR(duration,f)' (from 'CDR(duration,f)})' len 15)
[2016-01-19 13:15:39.870] WARNING[6917]: func_cdr.c:239 cdr_retrieve_time: Failed to fully extract 'start' from CDR
[2016-01-19 13:15:39.871] WARNING[6917]: func_cdr.c:239 cdr_retrieve_time: Failed to fully extract 'end' from CDR
[2016-01-19 13:15:39.871] DEBUG[6917]: pbx.c:4618 ast_str_substitute_variables_full: Function CDR(duration,f) result is '0.000000'
[2016-01-19 13:15:39.871] DEBUG[6917]: pbx.c:4584 ast_str_substitute_variables_full: Evaluating 'CDR(billsec,f)' (from 'CDR(billsec,f)})' len 14)
[2016-01-19 13:15:39.871] WARNING[6917]: func_cdr.c:239 cdr_retrieve_time: Failed to fully extract 'answer' from CDR
[2016-01-19 13:15:39.871] WARNING[6917]: func_cdr.c:239 cdr_retrieve_time: Failed to fully extract 'end' from CDR
[2016-01-19 13:15:39.871] DEBUG[6917]: pbx.c:4618 ast_str_substitute_variables_full: Function CDR(billsec,f) result is '0.000000'
> CDR(billsec,f) and CDR(duration,f) report incorrect values
> ----------------------------------------------------------
>
> Key: ASTERISK-25179
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25179
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CDR/cdr_custom, Functions/func_cdr
> Affects Versions: 13.4.0
> Reporter: Gianluca Merlo
> Assignee: Matt Jordan
> Attachments: ASTERISK-25179-13.diff
>
>
> Hello,
> I noticed, while reviewing CSV CDRs created with cdr_custom, that while CDR(billsec) and CDR(duration) report correct values, the corresponding high precision values CDR(billsec,f) and CDR(duration,f) are wrong. More specifically these values seem to be a thousandth of their non-high-precision counterpart (e.g. if CDR(billsec) is 37, CDR(billsec,f) is 0.037000 ).
> It seems to me that the code in funcs/func_cdr.c gets this value via ast_cdr_getvar() (from main/cdr.c), and assumes that the returned value is in milliseconds, this dividing the value by 1000. The problem appears to be that ast_cdr_getvar() gets the value via cdr_object_format_property() and thus via two specialized functions
> * cdr_object_get_duration()
> * cdr_object_get_billsec()
> which both return the value in seconds. General assumptions seem to indicate that internal representation of these values should be considered in milliseconds. I hope you can verify my guesses, and provide a consistent fix.
> As a side note, I can confirm that the issue was not present in the 1.8 series, and that the affected portions of code have been reorganized since then. In that version, values were returned in milliseconds, and the CDR() functions handled them properly.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list