switch_hash_t *template_hash;
char *log_dir;
char *default_template;
+ int masterfileonly;
int shutdown;
int rotate;
int debug;
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);
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")) {\r
+ globals.masterfileonly = switch_true(val);\r
}
}
}