aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-14 16:49:34 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-14 16:49:34 +0000
commit9389382205fe3a7183fcb261d80cbedefbfb1404 (patch)
tree7273f74c1ece370bc512199dd9d468648ed255a5 /pbx.c
parent1a9990d3b8ace6487c0231d6b9d6cc197a8f2aed (diff)
add an option to cdr.conf that enables ending CDRs before executing
the "h" extension as opposed to afterwards (issue #6193) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12896 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index 458f9d707..eca359cc7 100644
--- a/pbx.c
+++ b/pbx.c
@@ -2278,6 +2278,8 @@ static int __ast_pbx_run(struct ast_channel *c)
ast_log(LOG_WARNING, "Don't know what to do with '%s'\n", c->name);
out:
if ((res != AST_PBX_KEEPALIVE) && ast_exists_extension(c, c->context, "h", 1, c->cid.cid_num)) {
+ if (c->cdr && ast_opt_end_cdr_before_h_exten)
+ ast_cdr_end(c->cdr);
c->exten[0] = 'h';
c->exten[1] = '\0';
c->priority = 1;