diff options
-rw-r--r-- | include/asterisk/cdr.h | 10 | ||||
-rw-r--r-- | main/channel.c | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h index 6d633b990..8aaed10b5 100644 --- a/include/asterisk/cdr.h +++ b/include/asterisk/cdr.h @@ -39,15 +39,15 @@ #define AST_CDR_FLAG_DONT_TOUCH (1 << 9) #define AST_CDR_FLAG_POST_ENABLE (1 << 10) #define AST_CDR_FLAG_DIALED (1 << 11) +#define AST_CDR_FLAG_ORIGINATED (1 << 12) /*@} */ -#define AST_CDR_FLAG_ORIGINATED (1 << 11) /*! \name CDR Flags - Disposition */ /*@{ */ -#define AST_CDR_NULL 0 -#define AST_CDR_FAILED (1 << 0) -#define AST_CDR_BUSY (1 << 1) -#define AST_CDR_NOANSWER (1 << 2) +#define AST_CDR_NOANSWER 0 +#define AST_CDR_NULL (1 << 0) +#define AST_CDR_FAILED (1 << 1) +#define AST_CDR_BUSY (1 << 2) #define AST_CDR_ANSWERED (1 << 3) /*@} */ diff --git a/main/channel.c b/main/channel.c index 4fd3771d5..943f78407 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1711,6 +1711,7 @@ int ast_hangup(struct ast_channel *chan) chan->generator->release(chan, chan->generatordata); chan->generatordata = NULL; chan->generator = NULL; + if (ast_test_flag(chan, AST_FLAG_BLOCKING)) { ast_log(LOG_WARNING, "Hard hangup called by thread %ld on %s, while fd " "is blocked by thread %ld in procedure %s! Expect a failure\n", @@ -3994,8 +3995,10 @@ int ast_call(struct ast_channel *chan, char *addr, int timeout) /* Stop if we're a zombie or need a soft hangup */ ast_channel_lock(chan); if (!ast_test_flag(chan, AST_FLAG_ZOMBIE) && !ast_check_hangup(chan)) { - if (chan->cdr) + 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); ast_set_flag(chan, AST_FLAG_OUTGOING); |