[asterisk-bugs] [Asterisk 0013251]: endbeforehexten=yes is useless now

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Aug 9 14:40:15 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13251 
====================================================================== 
Reported By:                sergee
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13251
Category:                   CDR/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 135435 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-06 15:10 CDT
Last Modified:              2008-08-09 14:40 CDT
====================================================================== 
Summary:                    endbeforehexten=yes is useless now
Description: 
1. Part of code:

  if (c->cdr && ast_opt_end_cdr_before_h_exten)
	                         ast_cdr_end(c->cdr);

- missing (this is how it was
http://svn.digium.com/view/asterisk/trunk/pbx.c?r1=12896&r2=12895&pathrev=12896)

2. I have very simple scenario SIP/A calls SIP/B they talk 30 seconds,
then call is finished. Even after i call ast_cdr_end(chan->cdr) - manually
from my app,  these fields aren't initialized:

chan->cdr->billsec == 0,
chan->cdr->duration == 0,
chan->cdr->answer.tv_sec == 0,
chan->cdr->end.tv_sec == 0

3. as far as i understand, CDRs are posted now as soon as channels are
unbridged. This behavior breaks billings which make calculations inside 'h'
extensions. It would be nice to post CDRs after no more apps are left in
the 'h' extension or to have an application in the DialPlan, something like
CDRPost().

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

---------------------------------------------------------------------- 
 (0091252) sergee (reporter) - 2008-08-09 14:40
 http://bugs.digium.com/view.php?id=13251#c91252 
---------------------------------------------------------------------- 
This part of code from main_features.c ast_bridge_call()  - This is the
place where CDRs get posted. Can anybody explain me initial purpose of thi
code?

         /* 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) {
                         if (orig_peer_cdr && peer->cdr != orig_peer_cdr)
{
                                 /* this can only happen if there was a
transfer, methinks */
                                
ast_cdr_specialized_reset(orig_peer_cdr,0);
                         } else {
                                 ast_cdr_specialized_reset(peer->cdr,0);
                         }
                 }
2161         } 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-09 14:40 sergee         Note Added: 0091252                          
======================================================================




More information about the asterisk-bugs mailing list