[Home]

Summary:ASTERISK-10890: 1.4.14 breaks cdr posting
Reporter:cmaj (cmaj)Labels:
Date Opened:2007-11-26 11:46:28.000-0600Date Closed:2007-11-27 00:44:37.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:CDR/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Just upgraded from 1.4.8, to what I thought was a stable bug fix release of 1.4.14, and lookie here, CDR posting is completely busted.

****** ADDITIONAL INFORMATION ******

[Nov 26 12:46:04] NOTICE[26435]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/6-1' not posted
[Nov 26 12:46:04] NOTICE[26436]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/7-1' not posted
[Nov 26 12:46:05] NOTICE[26439]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/10-1' not posted
[Nov 26 12:46:05] NOTICE[26440]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/11-1' not posted
[Nov 26 12:46:05] NOTICE[26441]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/12-1' not posted
[Nov 26 12:46:05] NOTICE[26444]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/15-1' not posted
[Nov 26 12:46:05] NOTICE[26445]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/16-1' not posted
[Nov 26 12:46:05] NOTICE[26446]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/17-1' not posted
[Nov 26 12:46:05] NOTICE[26447]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/18-1' not posted
[Nov 26 12:46:05] NOTICE[26448]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/19-1' not posted
[Nov 26 12:46:06] NOTICE[26449]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/20-1' not posted
[Nov 26 12:46:06] NOTICE[26450]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/21-1' not posted
[Nov 26 12:46:06] NOTICE[26451]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/22-1' not posted
[Nov 26 12:46:06] NOTICE[26452]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/23-1' not posted
[Nov 26 12:46:10] NOTICE[26517]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/1-1' not posted
[Nov 26 12:46:14] NOTICE[26517]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/1-1' not posted
[Nov 26 12:46:19] NOTICE[26533]: cdr.c:434 ast_cdr_free: CDR on channel 'Zap/77-1' not posted
Comments:By: cmaj (cmaj) 2007-11-26 11:46:59.000-0600

Nothing changed, other than the upgrade.  Using cdr_pgsql.

By: cmaj (cmaj) 2007-11-26 11:50:14.000-0600

Well this makes no sense.  I see some CDRs in the database.  Not sure if it is all of them.

By: Tilghman Lesher (tilghman) 2007-11-26 11:52:00.000-0600

CDRs are generally not posted anymore, if the channel is not answered, which is the general case when channels are rung, but the calling channel hangs up before answer.

By: cmaj (cmaj) 2007-11-26 11:57:25.000-0600

How do I get back the original functionality ?

By: cmaj (cmaj) 2007-11-26 13:42:16.000-0600

Here's the change that did it.  Just need to roll back these two lines:

Index: main/cdr.c
===================================================================
--- main/cdr.c  (revision 82261)
+++ main/cdr.c  (revision 82262)
@@ -977,6 +977,8 @@
       struct ast_cdr_beitem *i;

       for ( ; cdr ; cdr = cdr->next) {
+               if (cdr->disposition < AST_CDR_ANSWERED && (ast_strlen_zero(cdr->channel) || ast_strlen_zero(cdr->dstchannel)))
+                       continue; /* people don't want to see unanswered single-channel events */
               chan = S_OR(cdr->channel, "<unknown>");
               check_post(cdr);
               if (ast_tvzero(cdr->end))



By: Jon Webster (jon) 2007-11-26 14:00:25.000-0600

I don't want to see them either!

By: cmaj (cmaj) 2007-11-26 14:10:26.000-0600

Then don't look at them!

By: Steve Murphy (murf) 2007-11-26 14:16:32.000-0600

Yes, cmaj is right. That will get you all the CDRs, and stop the irritating messages. I do have an idea, tho, how to provide you an option to stop the unanswered CDR's that result from an internal dial of multiple lines, but leave the unanswered CDR's that result from a call initiation... I shall explore that today, and see if I can close this bug (and the others) once and for all. literally.

By: Tilghman Lesher (tilghman) 2007-11-26 14:20:05.000-0600

Closing duplicate issue.

By: Digium Subversion (svnbot) 2007-11-27 00:21:33.000-0600

Repository: asterisk
Revision: 89622

U   branches/1.4/apps/app_dial.c
U   branches/1.4/configs/cdr.conf.sample
U   branches/1.4/include/asterisk/cdr.h
U   branches/1.4/main/cdr.c

------------------------------------------------------------------------
r89622 | murf | 2007-11-27 00:21:31 -0600 (Tue, 27 Nov 2007) | 1 line

closes issue ASTERISK-10890; OK, this is an attempt to make both sides happy. To the cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages.
------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-11-27 00:44:37.000-0600

Repository: asterisk
Revision: 89623

_U  trunk/
U   trunk/apps/app_dial.c
U   trunk/configs/cdr.conf.sample
U   trunk/include/asterisk/cdr.h
U   trunk/main/cdr.c

------------------------------------------------------------------------
r89623 | murf | 2007-11-27 00:44:36 -0600 (Tue, 27 Nov 2007) | 9 lines

Merged revisions 89622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89622 | murf | 2007-11-26 23:24:02 -0700 (Mon, 26 Nov 2007) | 1 line

closes issue ASTERISK-10890; OK, this is an attempt to make both sides happy. To the cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages.
........

------------------------------------------------------------------------