[Freeswitch-svn] [commit] r13968 - freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv

FreeSWITCH SVN mikej at freeswitch.org
Thu Jun 25 16:21:34 PDT 2009


Author: mikej
Date: Thu Jun 25 18:21:33 2009
New Revision: 13968

Log:
MODEVENT-44

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c

Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c	Thu Jun 25 18:21:33 2009
@@ -52,6 +52,7 @@
 	switch_hash_t *template_hash;
 	char *log_dir;
 	char *default_template;
+	int masterfileonly;
 	int shutdown;
 	int rotate;
 	int debug;
@@ -226,7 +227,7 @@
 
 	log_line = switch_channel_expand_variables(channel, a_template_str);
 
-	if (accountcode) {
+	if ((accountcode) && (!globals.masterfileonly)) {
 		path = switch_mprintf("%s%s%s.csv", log_dir, SWITCH_PATH_SEPARATOR, accountcode);
 		assert(path);
 		write_cdr(path, log_line);
@@ -338,6 +339,8 @@
 					globals.rotate = switch_true(val);
 				} else if (!strcasecmp(var, "default-template")) {
 					globals.default_template = switch_core_strdup(pool, val);
+				} else if (!strcasecmp(var, "master-file-only")) {
+					globals.masterfileonly = switch_true(val);
 				}
 			}
 		}



More information about the Freeswitch-svn mailing list