[asterisk-bugs] [Asterisk 0016422]: Asterisk 1.6.2: CDR is not produced with .call files
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Dec 17 09:41:05 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: acknowledged
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-17 09:41 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
======================================================================
----------------------------------------------------------------------
(0115381) lmadsen (administrator) - 2009-12-17 09:41
https://issues.asterisk.org/view.php?id=16422#c115381
----------------------------------------------------------------------
Actually, just for my own sanity, can you try the latest 1.6.1 or 1.6.2
branch? Perhaps the change went in after the release candidates were made.
svn co http://svn.asterisk.org/svn/asterisk/branches/1.6.1
Issue History
Date Modified Username Field Change
======================================================================
2009-12-17 09:41 lmadsen Note Added: 0115381
======================================================================
More information about the asterisk-bugs
mailing list