[asterisk-bugs] [Asterisk 0016422]: Asterisk 1.6.2: CDR is not produced with .call files
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Dec 15 16:53:46 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-15 16:53 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
======================================================================
----------------------------------------------------------------------
(0115308) western55 (reporter) - 2009-12-15 16:53
https://issues.asterisk.org/view.php?id=16422#c115308
----------------------------------------------------------------------
Upgraded to 1.6.1.12-rc1 and still having same problem. Not sure on how to
install above patch but .call files are not creating CDR even when using
context/extension/priority..
Connected to Asterisk 1.6.1.12-rc1 currently running on dialsrv01 (pid =
2007)
Example .call file:
Channel: DAHDI/g1/14803463430
CallerID: Mark <4803463430>
MaxRetries: 0
WaitTime: 300
Context: autodialer
Extension: 100
Priority: 1
Archive: Yes
Extensions.conf file:
[autodialer]
exten => _XXX,1,Answer()
exten => _XXX,n,Wait(5)
exten => _XXX,n,Hangup()
Issue History
Date Modified Username Field Change
======================================================================
2009-12-15 16:53 western55 Note Added: 0115308
======================================================================
More information about the asterisk-bugs
mailing list