[asterisk-commits] alecdavis: branch 1.4 r241458 - /branches/1.4/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 20 03:38:12 CST 2010


Author: alecdavis
Date: Wed Jan 20 03:38:09 2010
New Revision: 241458

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241458
Log:
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


Modified:
    branches/1.4/main/pbx.c

Modified: branches/1.4/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/pbx.c?view=diff&rev=241458&r1=241457&r2=241458
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Wed Jan 20 03:38:09 2010
@@ -2378,6 +2378,10 @@
 				ast_verbose( VERBOSE_PREFIX_2 "Starting %s at %s,%s,%d still failed so falling back to context 'default'\n", c->name, c->context, c->exten, c->priority);
 			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 */




More information about the asterisk-commits mailing list