diff options
author | Jonathan Rose <jrose@digium.com> | 2011-08-22 17:05:14 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2011-08-22 17:05:14 +0000 |
commit | 901e275c4c794933cad91244b90abe4f02390deb (patch) | |
tree | 5525bed32c28e78a18c149ad5c3887a233759a07 /main/pbx.c | |
parent | 91d3a7d3a1d5996ff66f4905beaf797f5e5cd47c (diff) |
Add option for logging congested calls as CONGESTION instead of NO_ANSWER in CDR
This patch adds a CDR option to cdr.conf that will allow CDR files to log calls ending
with congestion in a way that is unique from other unanswered calls.
(closes issue ASTERISK-14842)
Reported by: Alec Davis
Patches:
cdr_congestion.diff.txt (License #5546) patch uploaded by Alec Davis
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c index 74179f957..e0fa318ec 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -9323,11 +9323,16 @@ static int pbx_builtin_busy(struct ast_channel *chan, const char *data) */ static int pbx_builtin_congestion(struct ast_channel *chan, const char *data) { + ast_verb(1, "pbx_builtin_congestion HITINTHEFACE!\n"); + ast_verb(1, "AST_STATE = %d INTHEFACE\n", chan->_state); ast_indicate(chan, AST_CONTROL_CONGESTION); /* Don't change state of an UP channel, just indicate congestion in audio */ - if (chan->_state != AST_STATE_UP) + if (chan->_state != AST_STATE_UP) { ast_setstate(chan, AST_STATE_BUSY); + ast_verb(1, "ast_cdr_congestion INTHEFACE\n"); + ast_cdr_congestion(chan->cdr); + } wait_for_hangup(chan, data); return -1; } |