summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2011-07-27 20:42:18 +0000
committerJonathan Rose <jrose@digium.com>2011-07-27 20:42:18 +0000
commit3ee80d6a90c5ce59f20f9dfc89d7f3faaa4fd753 (patch)
tree6f0c57e23a37802b9b7309186c840e518f0f56d7 /main/pbx.c
parent1e332468dcef968070158b65ef532789ed6f1713 (diff)
Adds cdr logging of calls resulting in CONGESTION
Applies a patch made a long time ago by alecdavis which adds a CDR feature for logging calls that failed due to congestion. (closes issue #15907) Reported by: alecdavis Patches: cdr_congestion.diff.txt uploaded by alecdavis (license #5546) Review: https://reviewboard.asterisk.org/r/454/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index a2054646d..7ac332635 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -9321,8 +9321,10 @@ static int pbx_builtin_congestion(struct ast_channel *chan, const char *data)
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_cdr_congestion(chan->cdr);
+ }
wait_for_hangup(chan, data);
return -1;
}