aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authoralecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-20 09:37:40 +0000
committeralecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-20 09:37:40 +0000
commitc920e2ec33236feb3de9388fa9ca3056a16868e0 (patch)
tree444ce05368f8c36f5cc830d0e4eb9fc84bf5a94e /main/pbx.c
parent65bc1d4cc9935a6e98aab8c126b905d6afc67203 (diff)
Update CDR variables as pbx starts
Allows CDR variables added in cdr.c:set_one_cid to become visable during the call, by executing ast_cdr_update() early in __ast_pbx_run. Based on cdr_update.diff3.txt (issue #16638) Reported by: alecdavis Patches: cdr_update.diff3.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@241456 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index a8b33a2ee..daae9b571 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3756,6 +3756,10 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c,
ast_copy_string(c->context, "default", sizeof(c->context));
}
}
+ if (c->cdr) {
+ /* allow CDR variables that have been collected after channel was created to be visible during call */
+ ast_cdr_update(c);
+ }
for (;;) {
char dst_exten[256]; /* buffer to accumulate digits */
int pos = 0; /* XXX should check bounds */