[asterisk-bugs] [Asterisk 0013289]: Changes to NoCDR() prevent access to certain CDR variables post call hangup.

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 11 18:04:03 CDT 2008


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13289 
====================================================================== 
Reported By:                TechnoPirate
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13289
Category:                   Resources/res_features
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 132789 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-11 17:31 CDT
Last Modified:              2008-08-11 18:04 CDT
====================================================================== 
Summary:                    Changes to NoCDR() prevent access to certain CDR
variables post call hangup.
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).


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-11 18:04 murf           Status                   new => assigned     
2008-08-11 18:04 murf           Assigned To               => murf            
======================================================================




More information about the asterisk-bugs mailing list