[Core] Add exclude-error-log-from-xml-cdr config parameter and exclude_error_log_from_xml_cdr global variable.
This commit is contained in:
parent
97d5854655
commit
f289721147
|
@ -2309,6 +2309,13 @@ static void switch_load_core_config(const char *file)
|
|||
switch_core_set_variable("spawn_instead_of_system", "false");
|
||||
}
|
||||
#endif
|
||||
} else if (!strcasecmp(var, "exclude-error-log-from-xml-cdr") && !zstr(val)) {
|
||||
int v = switch_true(val);
|
||||
if (v) {
|
||||
switch_core_set_variable("exclude_error_log_from_xml_cdr", "true");
|
||||
} else {
|
||||
switch_core_set_variable("exclude_error_log_from_xml_cdr", "false");
|
||||
}
|
||||
} else if (!strcasecmp(var, "min-idle-cpu") && !zstr(val)) {
|
||||
switch_core_min_idle_cpu(atof(val));
|
||||
} else if (!strcasecmp(var, "tipping-point") && !zstr(val)) {
|
||||
|
|
|
@ -2690,6 +2690,7 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_call_stats(switch_xml_t xml, switch_core_
|
|||
int loff = 0;
|
||||
switch_rtp_stats_t *stats = switch_core_media_get_stats(session, type, NULL);
|
||||
char var_val[35] = "";
|
||||
switch_bool_t exclude_error_log_from_xml_cdr = switch_true(switch_core_get_variable("exclude_error_log_from_xml_cdr"));
|
||||
|
||||
if (!stats) return off;
|
||||
|
||||
|
@ -2727,7 +2728,7 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_call_stats(switch_xml_t xml, switch_core_
|
|||
add_stat_double(x_in, stats->inbound.mos, "mos");
|
||||
|
||||
|
||||
if (stats->inbound.error_log) {
|
||||
if (stats->inbound.error_log && !exclude_error_log_from_xml_cdr) {
|
||||
switch_xml_t x_err_log, x_err;
|
||||
switch_error_period_t *ep;
|
||||
int eoff = 0;
|
||||
|
|
Loading…
Reference in New Issue