[asterisk-bugs] [Asterisk 0016422]: Asterisk 1.6.2: CDR is not produced with .call files

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Dec 18 07:24:31 CST 2009


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16422 
====================================================================== 
Reported By:                mmoran69
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16422
Category:                   CDR/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                       SWP-513 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 227580 
Request Review:              
Resolution:                 fixed
Fixed in Version:           1.6.1.13
====================================================================== 
Date Submitted:             2009-12-09 18:18 CST
Last Modified:              2009-12-18 07:24 CST
====================================================================== 
Summary:                    Asterisk 1.6.2: CDR is not produced with .call files
Description: 
Asterisk 1.6.2 is not generating CDR for .call files.  Looking 
into the code I do not see code similar to patch from 
https://issues.asterisk.org/view.php?id=16222 applied.

Applying the same logic in channel.c/__ast_request_and_dial() as follows:

@@ -4432,12 +4432,24 @@
                                        break;
 
                                case AST_CONTROL_BUSY:
-                               case AST_CONTROL_CONGESTION:
-                               case AST_CONTROL_ANSWER:
+                                       ast_cdr_busy(chan->cdr);
                                        *outstate = f->subclass.integer;
-                                       timeout = 0;            /* trick 
to force exit from the while() */
+                                       timeout = 0;
                                        break;
 
+                               case AST_CONTROL_CONGESTION:
+                                        ast_cdr_failed(chan->cdr);
+                                        *outstate = f->subclass.integer;
+                                        timeout = 0;
+                                        break;
+
+                               case AST_CONTROL_ANSWER:
+                                       ast_cdr_answer(chan->cdr);
+                                       *outstate = f->subclass.integer;
+                                       timeout = 0;            /* trick 
to force exit from the while() */
+
                                /* Ignore these */
                                case AST_CONTROL_PROGRESS:
                                case AST_CONTROL_PROCEEDING:


.. but still wasn't working...  So, looking further, I found this in 
ast_hangup():

02210    if (chan->cdr) {     /* End the CDR if it hasn't already */
02211       ast_cdr_end(chan->cdr);
02212       cdr = chan->cdr;
02213       chan->cdr = NULL;
02214    }

Then this is never true and the CDR is not detached/posted:

02245    if (chan->cdr && !ast_test_flag(chan->cdr, 
AST_CDR_FLAG_BRIDGED) &&
02246       !ast_test_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED) &&
02247        (chan->cdr->disposition != AST_CDR_NULL || 
ast_test_flag(chan->cdr, AST_CDR_FLAG_DIALED))) {
02248       ast_channel_lock(chan);
02249         
02250       ast_cdr_end(chan->cdr);
02251       ast_cdr_detach(chan->cdr);
02252       chan->cdr = NULL;
02253       ast_channel_unlock(chan);
02254    }


I removed the first piece and then it works.

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0016450 .call file does not create cdr
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-18 07:24 lmadsen        Status                   feedback => closed  
2009-12-18 07:24 lmadsen        Resolution               open => fixed       
2009-12-18 07:24 lmadsen        Fixed in Version          => 1.6.1.13        
======================================================================




More information about the asterisk-bugs mailing list