[asterisk-bugs] [Asterisk 0011721]: When using ForkCDR Asterisk does not set the duration and billsec correcty

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Jan 24 14:41:07 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11721 
====================================================================== 
Reported By:                voipgate
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   11721
Category:                   Applications/app_forkcdr
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 92122 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-09-2008 19:46 CST
Last Modified:              01-24-2008 14:41 CST
====================================================================== 
Summary:                    When using ForkCDR Asterisk does not set the
duration and billsec correcty
Description: 
When using ForkCDR and the call has not been answered, Asterisk creates 2
cdr's but one of them lacks the data for billsec and duration. The purpose
of a fork is to create 2 cdrs but with different variables (accountcode,
userfield) but the duration and bill seconds as well as the disposition
must be set.
====================================================================== 

---------------------------------------------------------------------- 
 markab21 - 01-24-08 14:41  
---------------------------------------------------------------------- 
I've been able to replicate this issue and have tracked down the issue to
the flag being set on forkcdr:

ast_set_flag(cdr, AST_CDR_FLAG_CHILD | AST_CDR_FLAG_LOCKED);


The CDR record is being locked, but never cleared.  I've not figured out
why this is the case, but by simply changing the line of code to: 


ast_set_flag(cdr, AST_CDR_FLAG_CHILD);

(removing the flag of AST_CDR_FLAG_LOCKED )

Resolved the issue.

I've tested the change on both 1.4.14 and 1.6 beta 1 and this issue didn't
have any negative impact on the CDR postings.  


I've attached a new app_forkcdr.c with the fixes in it. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-24-08 14:41  markab21       Note Added: 0081154                          
======================================================================




More information about the asterisk-bugs mailing list