Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8eda172a
提交
8eda172a
authored
9月 12, 2016
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-9503 #resolve [Add flaws and consecutive_flaws to error_log in rtp]
上级
f3b22f61
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
0 行删除
+29
-0
switch_types.h
src/include/switch_types.h
+2
-0
switch_ivr.c
src/switch_ivr.c
+10
-0
switch_rtp.c
src/switch_rtp.c
+17
-0
没有找到文件。
src/include/switch_types.h
浏览文件 @
8eda172a
...
@@ -621,6 +621,8 @@ typedef uint32_t switch_vad_flag_t;
...
@@ -621,6 +621,8 @@ typedef uint32_t switch_vad_flag_t;
typedef
struct
error_period
{
typedef
struct
error_period
{
int64_t
start
;
int64_t
start
;
int64_t
stop
;
int64_t
stop
;
uint32_t
flaws
;
uint32_t
consecutive_flaws
;
struct
error_period
*
next
;
struct
error_period
*
next
;
}
switch_error_period_t
;
}
switch_error_period_t
;
...
...
src/switch_ivr.c
浏览文件 @
8eda172a
...
@@ -2645,6 +2645,14 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_call_stats(switch_xml_t xml, switch_core_
...
@@ -2645,6 +2645,14 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_call_stats(switch_xml_t xml, switch_core_
x_tmp
=
switch_xml_add_child_d
(
x_err
,
"stop"
,
1
);
x_tmp
=
switch_xml_add_child_d
(
x_err
,
"stop"
,
1
);
switch_xml_set_txt_d
(
x_tmp
,
var_val
);
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
);
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
);
x_tmp
=
switch_xml_add_child_d
(
x_err
,
"duration-msec"
,
2
);
switch_xml_set_txt_d
(
x_tmp
,
var_val
);
switch_xml_set_txt_d
(
x_tmp
,
var_val
);
...
@@ -3127,6 +3135,8 @@ SWITCH_DECLARE(void) switch_ivr_set_json_call_stats(cJSON *json, switch_core_ses
...
@@ -3127,6 +3135,8 @@ SWITCH_DECLARE(void) switch_ivr_set_json_call_stats(cJSON *json, switch_core_ses
cJSON_AddItemToObject
(
j_err
,
"start"
,
cJSON_CreateNumber
(
ep
->
start
));
cJSON_AddItemToObject
(
j_err
,
"start"
,
cJSON_CreateNumber
(
ep
->
start
));
cJSON_AddItemToObject
(
j_err
,
"stop"
,
cJSON_CreateNumber
(
ep
->
stop
));
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_AddItemToObject
(
j_err
,
"durationMS"
,
cJSON_CreateNumber
((
ep
->
stop
-
ep
->
start
)
/
1000
));
cJSON_AddItemToArray
(
j_err_log
,
j_err
);
cJSON_AddItemToArray
(
j_err_log
,
j_err
);
}
}
...
...
src/switch_rtp.c
浏览文件 @
8eda172a
...
@@ -1544,6 +1544,11 @@ static void do_mos(switch_rtp_t *rtp_session, int force) {
...
@@ -1544,6 +1544,11 @@ static void do_mos(switch_rtp_t *rtp_session, int force) {
rtp_session
->
consecutive_flaws
,
penalty
);
rtp_session
->
consecutive_flaws
,
penalty
);
rtp_session
->
bad_stream
++
;
rtp_session
->
bad_stream
++
;
rtp_session
->
stats
.
inbound
.
flaws
+=
penalty
;
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
);
R
=
(
int
)((
double
)((
double
)(
rtp_session
->
stats
.
inbound
.
recved
-
rtp_session
->
stats
.
inbound
.
flaws
)
/
(
double
)
rtp_session
->
stats
.
inbound
.
recved
)
*
100
.
0
);
...
@@ -1643,6 +1648,11 @@ static void check_jitter(switch_rtp_t *rtp_session)
...
@@ -1643,6 +1648,11 @@ static void check_jitter(switch_rtp_t *rtp_session)
rtp_session
->
bad_stream
++
;
rtp_session
->
bad_stream
++
;
rtp_session
->
stats
.
inbound
.
flaws
+=
lost
;
rtp_session
->
stats
.
inbound
.
flaws
+=
lost
;
if
(
rtp_session
->
stats
.
inbound
.
error_log
)
{
rtp_session
->
stats
.
inbound
.
error_log
->
flaws
+=
lost
;
}
}
else
{
}
else
{
rtp_session
->
stats
.
inbound
.
last_loss
=
0
;
rtp_session
->
stats
.
inbound
.
last_loss
=
0
;
}
}
...
@@ -6291,6 +6301,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
...
@@ -6291,6 +6301,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
rtp_session
->
bad_stream
++
;
rtp_session
->
bad_stream
++
;
rtp_session
->
stats
.
inbound
.
flaws
+=
rtp_session
->
sync_packets
;
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_core_timer_sync
(
&
rtp_session
->
timer
);
...
@@ -6857,6 +6871,9 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
...
@@ -6857,6 +6871,9 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG1
,
"%s %s timeout
\n
"
,
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
));
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
++
;
rtp_session
->
stats
.
inbound
.
flaws
++
;
do_mos
(
rtp_session
,
SWITCH_FALSE
);
do_mos
(
rtp_session
,
SWITCH_FALSE
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论