[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:22:50 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
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:                     feedback
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:              
====================================================================== 
Date Submitted:             2009-12-09 18:18 CST
Last Modified:              2009-12-18 07:22 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
====================================================================== 

---------------------------------------------------------------------- 
 (0115418) lmadsen (administrator) - 2009-12-18 07:22
 https://issues.asterisk.org/view.php?id=16422#c115418 
---------------------------------------------------------------------- 
Huh, interesting. Could have sworn that had made it in, but perhaps it
*just* missed.

OK, I'm going to close this issue then as resolved in a future version --
likely 1.6.1.13 and 1.6.2.1, which I'm hoping will be released in late
January. Release candidates should be available at the start of the new
year. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-18 07:22 lmadsen        Note Added: 0115418                          
======================================================================




More information about the asterisk-bugs mailing list