[Home]

Summary:ASTERISK-12566: Changes to NoCDR() prevent access to certain CDR variables post call hangup.
Reporter:Brandon (technopirate)Labels:
Date Opened:2008-08-11 17:31:59Date Closed:2008-09-12 00:01:26
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_features
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:During an update to the NOCDR() code recently the following code was added to res\res_features.c @1647:

/* obey the NoCDR() wishes. */
if (!chan->cdr || (chan->cdr && !ast_test_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED))) {

ast_cdr_end(bridge_cdr);

ast_cdr_detach(bridge_cdr);

/* just in case, these channels get bridged again before hangup */
if (chan->cdr)
ast_cdr_specialized_reset(chan->cdr,0);
if (peer->cdr)
ast_cdr_specialized_reset(peer->cdr,0);
}


However the calls to ast_cdr_specialized_reset() are clearing the CDR data even if NOCDR is not being called.

IE what worked before:
exten => h,1,DEADAGI(log-call.agi|2,${EPOCH},${HANGUPCAUSE},${CDR(answer)},${CDR(dstchannel)},${SIPUSERAGENT},${CDR(accountcode)})


would now cause ${CDR(answer)} to be equal to NULL and not set at all (other data is available).



****** ADDITIONAL INFORMATION ******

Removing the calls to ast_cdr_specialized_reset() restores behavior and allows access to the CDR(answer) variable.

Not 100% sure if this was intended or an unintended byproduct of the changes.
Comments:By: Steve Murphy (murf) 2008-09-12 00:01:24

I am closing this bug along with 13251; for the svn versions and commit msg verbage, see 13251; If the fixes in svn versions 142675 thru 142678 don't solve your problem, please feel free to re-open this issue.