[asterisk-commits] rmudgett: branch group/issue14068 r198081 - in /team/group/issue14068: ./ inc...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 29 14:18:25 CDT 2009
Author: rmudgett
Date: Fri May 29 14:18:20 2009
New Revision: 198081
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198081
Log:
Merged revisions 198072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r198072 | mnicholson | 2009-05-29 14:04:24 -0500 (Fri, 29 May 2009) | 21 lines
Merged revisions 198068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r198068 | mnicholson | 2009-05-29 13:53:01 -0500 (Fri, 29 May 2009) | 15 lines
Use AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.
This change also involves the addition of an AST_CDR_FLAG_ORIGINATED flag that is used on originated channels to distinguish: them from dialed channels.
(closes issue #12946)
Reported by: meral
Patches:
null-cdr2.diff uploaded by mnicholson (license 96)
Tested by: mnicholson, dbrooks
(closes issue #15122)
Reported by: sum
Tested by: sum
........
................
Modified:
team/group/issue14068/ (props changed)
team/group/issue14068/include/asterisk/cdr.h
team/group/issue14068/main/cdr.c
team/group/issue14068/main/channel.c
Propchange: team/group/issue14068/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/group/issue14068/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri May 29 14:18:20 2009
@@ -1,1 +1,1 @@
-/trunk:1-198069
+/trunk:1-198075
Modified: team/group/issue14068/include/asterisk/cdr.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/include/asterisk/cdr.h?view=diff&rev=198081&r1=198080&r2=198081
==============================================================================
--- team/group/issue14068/include/asterisk/cdr.h (original)
+++ team/group/issue14068/include/asterisk/cdr.h Fri May 29 14:18:20 2009
@@ -40,6 +40,7 @@
#define AST_CDR_FLAG_POST_ENABLE (1 << 10)
#define AST_CDR_FLAG_DIALED (1 << 11)
/*@} */
+#define AST_CDR_FLAG_ORIGINATED (1 << 11)
/*! \name CDR Flags - Disposition */
/*@{ */
Modified: team/group/issue14068/main/cdr.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/main/cdr.c?view=diff&rev=198081&r1=198080&r2=198081
==============================================================================
--- team/group/issue14068/main/cdr.c (original)
+++ team/group/issue14068/main/cdr.c Fri May 29 14:18:20 2009
@@ -850,7 +850,7 @@
ast_copy_string(cdr->channel, c->name, sizeof(cdr->channel));
set_one_cid(cdr, c);
- cdr->disposition = (c->_state == AST_STATE_UP) ? AST_CDR_ANSWERED : AST_CDR_NULL;
+ cdr->disposition = (c->_state == AST_STATE_UP) ? AST_CDR_ANSWERED : AST_CDR_NOANSWER;
cdr->amaflags = c->amaflags ? c->amaflags : ast_default_amaflags;
ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
/* Destination information */
@@ -1037,6 +1037,14 @@
continue;
}
+ /* don't post CDRs that are for dialed channels unless those
+ * channels were originated from asterisk (pbx_spool, manager,
+ * cli) */
+ if (ast_test_flag(cdr, AST_CDR_FLAG_DIALED) && !ast_test_flag(cdr, AST_CDR_FLAG_ORIGINATED)) {
+ ast_set_flag(cdr, AST_CDR_FLAG_POST_DISABLED);
+ continue;
+ }
+
chan = S_OR(cdr->channel, "<unknown>");
check_post(cdr);
ast_set_flag(cdr, AST_CDR_FLAG_POSTED);
@@ -1088,7 +1096,7 @@
cdr->billsec = 0;
cdr->duration = 0;
ast_cdr_start(cdr);
- cdr->disposition = AST_CDR_NULL;
+ cdr->disposition = AST_CDR_NOANSWER;
}
}
}
Modified: team/group/issue14068/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/main/channel.c?view=diff&rev=198081&r1=198080&r2=198081
==============================================================================
--- team/group/issue14068/main/channel.c (original)
+++ team/group/issue14068/main/channel.c Fri May 29 14:18:20 2009
@@ -3971,6 +3971,7 @@
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);
+ ast_set_flag(chan->cdr, AST_CDR_FLAG_ORIGINATED);
ast_party_connected_line_set_init(&connected, &chan->connected);
connected.id.number = (char *) cid_num;
connected.id.name = (char *) cid_name;
More information about the asterisk-commits
mailing list