diff options
author | alecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-20 09:37:25 +0000 |
---|---|---|
committer | alecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-20 09:37:25 +0000 |
commit | 2ade9292b2306871b2d42476f15452156f635b6b (patch) | |
tree | d8a271f917bb4162b8fdf007fe71d2c5997f67ad | |
parent | f30b10264f89f010aeb8b0c6085de3be2320cebd (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.2@241455 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/pbx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index 72be23272..8f7a33ea6 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -4249,6 +4249,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 */ |