[svn-commits] alecdavis: trunk r241416 - in /trunk: channels/sig_pri.c main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jan 20 02:18:51 CST 2010


Author: alecdavis
Date: Wed Jan 20 02:18:45 2010
New Revision: 241416

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241416
Log:
Update CDR variables before 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.
Reverts sig_pri changes in trunk that are specific to isdn technology only.

(issue #16638)
Reported by: alecdavis
Patches: 
      cdr_update.diff3.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


Modified:
    trunk/channels/sig_pri.c
    trunk/main/pbx.c

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=241416&r1=241415&r2=241416
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Wed Jan 20 02:18:45 2010
@@ -2515,7 +2515,6 @@
 								sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.channel,
 									e->ring.subcmds, e->ring.call);
 
-								ast_cdr_update(c);
 							}
 							if (c && !ast_pthread_create_detached(&threadid, NULL, pri_ss_thread, pri->pvts[chanpos])) {
 								ast_verb(3, "Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d\n",
@@ -2618,7 +2617,6 @@
 								sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.channel,
 									e->ring.subcmds, e->ring.call);
 
-								ast_cdr_update(c);
 							}
 							if (c && !ast_pbx_start(c)) {
 								ast_verb(3, "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",

Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=241416&r1=241415&r2=241416
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Jan 20 02:18:45 2010
@@ -4628,6 +4628,10 @@
 			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 */




More information about the svn-commits mailing list