[Home]

Summary:ASTERISK-10747: [patch] ast_cdr_free: CDR on channel 'SIP/02571-09174500' not posted
Reporter:tfitch (tfitch)Labels:
Date Opened:2007-11-12 19:26:51.000-0600Date Closed:2007-11-27 16:30:25.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:CDR/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cdr_warning.patch
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.)
Comments:By: Steve Murphy (murf) 2007-11-27 16:29:40.000-0600

See 11379 (and 10659). I think I've fixed this problem when I fixed those. You are right about using the flags. Reopen if this is not fixed to your satisfaction.