diff options
-rw-r--r-- | main/cdr.c | 9 | ||||
-rw-r--r-- | main/channel.c | 1 | ||||
-rw-r--r-- | res/res_features.c | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/main/cdr.c b/main/cdr.c index b347bcc4d..7868c1a64 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -720,8 +720,7 @@ void ast_cdr_busy(struct ast_cdr *cdr) for (; cdr; cdr = cdr->next) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { check_post(cdr); - if (cdr->disposition < AST_CDR_BUSY) - cdr->disposition = AST_CDR_BUSY; + cdr->disposition = AST_CDR_BUSY; } } } @@ -743,11 +742,9 @@ void ast_cdr_noanswer(struct ast_cdr *cdr) while (cdr) { chan = !ast_strlen_zero(cdr->channel) ? cdr->channel : "<unknown>"; - if (ast_test_flag(cdr, AST_CDR_FLAG_POSTED)) - ast_log(LOG_WARNING, "CDR on channel '%s' already posted\n", chan); + check_post(cdr); if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { - if (cdr->disposition < AST_CDR_NOANSWER) - cdr->disposition = AST_CDR_NOANSWER; + cdr->disposition = AST_CDR_NOANSWER; } cdr = cdr->next; } diff --git a/main/channel.c b/main/channel.c index eb4aa05d9..3c02beda6 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3480,7 +3480,6 @@ int ast_call(struct ast_channel *chan, char *addr, int timeout) if (!ast_test_flag(chan, AST_FLAG_ZOMBIE) && !ast_check_hangup(chan)) { if (chan->cdr) { ast_set_flag(chan->cdr, AST_CDR_FLAG_DIALED); - ast_set_flag(chan->cdr, AST_CDR_FLAG_ORIGINATED); } if (chan->tech->call) res = chan->tech->call(chan, addr, timeout); diff --git a/res/res_features.c b/res/res_features.c index 7d53d185d..8690d3ab5 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1847,6 +1847,11 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast ast_set_flag(peer_cdr, AST_CDR_FLAG_BRIDGED); } } + /* the DIALED flag may be set if a dialed channel is transfered + * and then bridged to another channel. In order for the + * bridge CDR to be written, the DIALED flag must not be + * present. */ + ast_clear_flag(bridge_cdr, AST_CDR_FLAG_DIALED); } for (;;) { |