[asterisk-bugs] [Asterisk 0011226]: [patch] ast_cdr_free: CDR on channel 'SIP/02571-09174500' not posted

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Nov 13 14:53:07 CST 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11226 
====================================================================== 
Reported By:                tfitch
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   11226
Category:                   CDR/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.13  
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 89202 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-12-2007 19:26 CST
Last Modified:              11-13-2007 14:53 CST
====================================================================== 
Summary:                    [patch]  ast_cdr_free: CDR on channel
'SIP/02571-09174500' not posted
Description: 
This was reported at http://forums.digium.com/viewtopic.php?t=18413
referring to v1.4.12.1 but I am also seeing it in 1.4.13 on my system.

This error log is posted if the "cdr" flag bit field does not have either
the AST_CDR_FLAG_POSTED or AST_CDR_FLAG_POST_DISABLED bits set. This can
easily happen if the caller hangs up early in the call sequence.

In main/cdr.c ast_cdr_free() only called after a call to post_cdr() or, in
one case, after setting the cdr flag to AST_CDR_FLAG_POST_DISABLED. (While
ast_cdr_free() is declared global I see no other use of it in asterisk.)

As of SVN revision 82261, post_cdr() does not log the record if the call
did not achieve an answered state and either the channel or destination
channel are empty. Unfortunately it does not flag the record as either
AST_CDR_FLAG_POSTED or AST_CDR_FLAG_POST_DISABLED so when the record is
released an error is logged.

This patch marks the record by setting the AST_CDR_FLAG_POST_DISABLED if
post_cdr() decides not to log the record. Trunk and branches/asterisk-1.4
have identical code in this area, so I am only providing a patch for the
v1.4 branch.

(don't see how to attach patch. I assume I can upload it after bug is
submitted.)
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-13-07 14:53  qwell          Status                   new => assigned     
11-13-07 14:53  qwell          Assigned To               => murf            
======================================================================




More information about the asterisk-bugs mailing list