x_tmp = switch_xml_add_child_d(x_err, "stop", 1);
switch_xml_set_txt_d(x_tmp, var_val);
+ switch_snprintf(var_val, sizeof(var_val), "%" SWITCH_TIME_T_FMT, ep->flaws);
+ x_tmp = switch_xml_add_child_d(x_err, "flaws", 1);
+ switch_xml_set_txt_d(x_tmp, var_val);
+
+ switch_snprintf(var_val, sizeof(var_val), "%" SWITCH_TIME_T_FMT, ep->consecutive_flaws);
+ x_tmp = switch_xml_add_child_d(x_err, "consecutive-flaws", 1);
+ switch_xml_set_txt_d(x_tmp, var_val);
+
switch_snprintf(var_val, sizeof(var_val), "%" SWITCH_TIME_T_FMT, (ep->stop - ep->start) / 1000);
x_tmp = switch_xml_add_child_d(x_err, "duration-msec", 2);
switch_xml_set_txt_d(x_tmp, var_val);
cJSON_AddItemToObject(j_err, "start", cJSON_CreateNumber(ep->start));
cJSON_AddItemToObject(j_err, "stop", cJSON_CreateNumber(ep->stop));
+ cJSON_AddItemToObject(j_err, "flaws", cJSON_CreateNumber(ep->flaws));
+ cJSON_AddItemToObject(j_err, "Consecutiveflaws", cJSON_CreateNumber(ep->consecutive_flaws));
cJSON_AddItemToObject(j_err, "durationMS", cJSON_CreateNumber((ep->stop - ep->start) / 1000));
cJSON_AddItemToArray(j_err_log, j_err);
}
rtp_session->consecutive_flaws, penalty);
rtp_session->bad_stream++;
rtp_session->stats.inbound.flaws += penalty;
+
+ if (rtp_session->stats.inbound.error_log) {
+ rtp_session->stats.inbound.error_log->flaws += penalty;
+ rtp_session->stats.inbound.error_log->consecutive_flaws++;
+ }
}
R = (int)((double)((double)(rtp_session->stats.inbound.recved - rtp_session->stats.inbound.flaws) / (double)rtp_session->stats.inbound.recved) * 100.0);
rtp_session->bad_stream++;
rtp_session->stats.inbound.flaws += lost;
+
+ if (rtp_session->stats.inbound.error_log) {
+ rtp_session->stats.inbound.error_log->flaws += lost;
+ }
+
} else {
rtp_session->stats.inbound.last_loss = 0;
}
rtp_session->bad_stream++;
rtp_session->stats.inbound.flaws += rtp_session->sync_packets;
+
+ if (rtp_session->stats.inbound.error_log) {
+ rtp_session->stats.inbound.error_log->flaws += rtp_session->sync_packets;
+ }
}
switch_core_timer_sync(&rtp_session->timer);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "%s %s timeout\n",
rtp_session_name(rtp_session), rtp_type(rtp_session));
+ if (rtp_session->stats.inbound.error_log) {
+ rtp_session->stats.inbound.error_log->flaws++;
+ }
rtp_session->stats.inbound.flaws++;
do_mos(rtp_session, SWITCH_FALSE);
}