aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-10 14:33:02 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-10 14:33:02 +0000
commit8a4ad70752e33426b94631733696a05786ce99f1 (patch)
treec4955643e7b14dd3ecf5f1e41c9f4a655d0306e8 /main
parent242c5ef0b21ca32290cb4fea84fd3e72306e44b2 (diff)
Move where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
(closes issue #11516) Reported by: ys Patches: branch_1.4_cdr.diff uploaded by ys (license 281) Tested by: anest, jcapp, dartvader git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107016 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/cdr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/main/cdr.c b/main/cdr.c
index ee0086444..377ee09ac 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -103,11 +103,6 @@ AST_MUTEX_DEFINE_STATIC(cdr_pending_lock);
static ast_cond_t cdr_pending_cond;
-int ast_cdr_log_unanswered(void)
-{
- return unanswered;
-}
-
/*! Register a CDR driver. Each registered CDR driver generates a CDR
\return 0 on success, -1 on failure
*/
@@ -986,6 +981,12 @@ static void post_cdr(struct ast_cdr *cdr)
struct ast_cdr_beitem *i;
for ( ; cdr ; cdr = cdr->next) {
+ if (!unanswered && cdr->disposition < AST_CDR_ANSWERED && (ast_strlen_zero(cdr->channel) || ast_strlen_zero(cdr->dstchannel))) {
+ /* For people, who don't want to see unanswered single-channel events */
+ ast_set_flag(cdr, AST_CDR_FLAG_POST_DISABLED);
+ continue;
+ }
+
chan = S_OR(cdr->channel, "<unknown>");
check_post(cdr);
if (ast_tvzero(cdr->end))