[Freeswitch-svn] [commit] r13209 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Thu Apr 30 06:53:29 PDT 2009


Author: anthm
Date: Thu Apr 30 08:53:29 2009
New Revision: 13209

Log:
FSCORE-359

Modified:
   freeswitch/trunk/src/switch_ivr_originate.c

Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c	(original)
+++ freeswitch/trunk/src/switch_ivr_originate.c	Thu Apr 30 08:53:29 2009
@@ -918,6 +918,7 @@
 	uint32_t progress_timelimit_sec = 0;
 	const char *cid_tmp;
 	originate_global_t oglobals = { 0 };
+	int cdr_total = 0;
 
 	oglobals.idx = IDX_NADA;
 	oglobals.early_ok = 1;
@@ -1007,8 +1008,18 @@
 
 	if (oglobals.session) {
 		switch_event_header_t *hi;
+		const char *cdr_total_var;
+
 		caller_channel = switch_core_session_get_channel(oglobals.session);
 
+		if ((cdr_total_var = switch_channel_get_variable(caller_channel, "failed_xml_cdr_total"))) {
+			int tmp = atoi(cdr_total_var);
+			if (tmp > 0) {
+				cdr_total = tmp;
+			}
+		}
+		
+
 		/* Copy all the applicable channel variables into the event */
 		if ((hi = switch_channel_variable_first(caller_channel))) {
 			for (; hi; hi = hi->next) {
@@ -2018,7 +2029,6 @@
 
 			} else {
 				const char *cdr_var = NULL;
-				int cdr_total = 0;
 				switch_xml_t cdr;
 				char *xml_text;
 				char buf[128] = "", buf2[128] = "";



More information about the Freeswitch-svn mailing list