Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c79360c5
提交
c79360c5
authored
11月 11, 2014
作者:
Nathan Neulinger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reduce logging when level is below 9 for less important messages
上级
ab24bde2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
62 行增加
和
30 行删除
+62
-30
skinny_protocol.c
src/mod/endpoints/mod_skinny/skinny_protocol.c
+33
-18
skinny_server.c
src/mod/endpoints/mod_skinny/skinny_server.c
+29
-12
没有找到文件。
src/mod/endpoints/mod_skinny/skinny_protocol.c
浏览文件 @
c79360c5
...
...
@@ -506,9 +506,11 @@ switch_status_t perform_send_register_ack(listener_t *listener,
message
->
data
.
reg_ack
.
secondary_keep_alive
=
keep_alive
;
switch_copy_string
(
message
->
data
.
reg_ack
.
reserved2
,
reserved2
,
4
);
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Sending Register Ack with Keep Alive (%d), Date Format (%s), Secondary Keep Alive (%d)
\n
"
,
keep_alive
,
date_format
,
secondary_keep_alive
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Sending Register Ack with Keep Alive (%d), Date Format (%s), Secondary Keep Alive (%d)
\n
"
,
keep_alive
,
date_format
,
secondary_keep_alive
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -527,9 +529,11 @@ switch_status_t perform_send_speed_dial_stat_res(listener_t *listener,
switch_copy_string
(
message
->
data
.
speed_dial_res
.
line
,
speed_line
,
24
);
switch_copy_string
(
message
->
data
.
speed_dial_res
.
label
,
speed_label
,
40
);
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Sending Speed Dial Stat Res with Number (%d), Line (%s), Label (%s)
\n
"
,
number
,
speed_line
,
speed_label
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Sending Speed Dial Stat Res with Number (%d), Line (%s), Label (%s)
\n
"
,
number
,
speed_line
,
speed_label
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -791,8 +795,10 @@ switch_status_t perform_send_call_info(listener_t *listener,
message
->
data
.
call_info
.
call_security_status
=
call_security_status
;
message
->
data
.
call_info
.
party_pi_restriction_bits
=
party_pi_restriction_bits
;
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Call Info with Line Instance (%d)...
\n
"
,
line_instance
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Call Info with Line Instance (%d)...
\n
"
,
line_instance
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -823,9 +829,11 @@ switch_status_t perform_send_define_time_date(listener_t *listener,
message
->
data
.
define_time_date
.
milliseconds
=
milliseconds
;
message
->
data
.
define_time_date
.
timestamp
=
timestamp
;
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Define Time Date with %.4d-%.2d-%.2d %.2d:%.2d:%.2d.%d, Timestamp (%d), DOW (%d)
\n
"
,
year
,
month
,
day
,
hour
,
minute
,
seconds
,
milliseconds
,
timestamp
,
day_of_week
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Define Time Date with %.4d-%.2d-%.2d %.2d:%.2d:%.2d.%d, Timestamp (%d), DOW (%d)
\n
"
,
year
,
month
,
day
,
hour
,
minute
,
seconds
,
milliseconds
,
timestamp
,
day_of_week
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -857,8 +865,10 @@ switch_status_t perform_send_capabilities_req(listener_t *listener,
skinny_create_empty_message
(
message
,
CAPABILITIES_REQ_MESSAGE
);
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Capabilities Req%s
\n
"
,
""
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Capabilities Req%s
\n
"
,
""
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -873,8 +883,10 @@ switch_status_t perform_send_version(listener_t *listener,
memcpy
(
message
->
data
.
version
.
version
,
version
,
16
);
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Version with Version(%s)
\n
"
,
version
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Version with Version(%s)
\n
"
,
version
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -973,9 +985,11 @@ switch_status_t perform_send_select_soft_keys(listener_t *listener,
message
->
data
.
select_soft_keys
.
soft_key_set
=
soft_key_set
;
message
->
data
.
select_soft_keys
.
valid_key_mask
=
valid_key_mask
;
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Select Soft Keys with Line Instance (%d), Call ID (%d), Soft Key Set (%d), Valid Key Mask (%x)
\n
"
,
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Send Select Soft Keys with Line Instance (%d), Call ID (%d), Soft Key Set (%d), Valid Key Mask (%x)
\n
"
,
line_instance
,
call_id
,
soft_key_set
,
valid_key_mask
);
}
return
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
}
...
...
@@ -1299,7 +1313,8 @@ switch_status_t skinny_perform_send_reply(listener_t *listener, const char *file
ptr
=
(
char
*
)
reply
;
if
(
listener_is_ready
(
listener
))
{
if
(
listener
->
profile
->
debug
>=
10
||
reply
->
type
!=
KEEP_ALIVE_ACK_MESSAGE
)
{
if
(
listener
->
profile
->
debug
>=
10
||
(
listener
->
profile
->
debug
>=
9
&&
reply
->
type
!=
KEEP_ALIVE_ACK_MESSAGE
))
{
skinny_log_l_ffl
(
listener
,
file
,
func
,
line
,
SWITCH_LOG_DEBUG
,
"Sending %s (type=%x,length=%d).
\n
"
,
skinny_message_type2str
(
reply
->
type
),
reply
->
type
,
reply
->
length
);
...
...
src/mod/endpoints/mod_skinny/skinny_server.c
浏览文件 @
c79360c5
...
...
@@ -1621,8 +1621,10 @@ switch_status_t skinny_handle_forward_stat_req_message(listener_t *listener, ski
message
->
data
.
forward_stat
.
line_instance
=
request
->
data
.
forward_stat_req
.
line_instance
;
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Forward Stat Req Message with Line Instance (%d)
\n
"
,
request
->
data
.
forward_stat_req
.
line_instance
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Forward Stat Req Message with Line Instance (%d)
\n
"
,
request
->
data
.
forward_stat_req
.
line_instance
);
}
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -1634,7 +1636,9 @@ switch_status_t skinny_handle_speed_dial_stat_request(listener_t *listener, skin
skinny_check_data_length
(
request
,
sizeof
(
request
->
data
.
speed_dial_req
));
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Speed Dial Stat Request for Number (%d)
\n
"
,
request
->
data
.
speed_dial_req
.
number
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Speed Dial Stat Request for Number (%d)
\n
"
,
request
->
data
.
speed_dial_req
.
number
);
}
skinny_speed_dial_get
(
listener
,
request
->
data
.
speed_dial_req
.
number
,
&
button
);
...
...
@@ -1906,7 +1910,9 @@ switch_status_t skinny_handle_capabilities_response(listener_t *listener, skinny
skinny_execute_sql
(
profile
,
sql
,
profile
->
sql_mutex
);
switch_safe_free
(
sql
);
}
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Codecs %s supported.
\n
"
,
codec_string
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Codecs %s supported.
\n
"
,
codec_string
);
}
switch_safe_free
(
codec_string
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -2036,11 +2042,15 @@ switch_status_t skinny_handle_soft_key_set_request(listener_t *listener, skinny_
if
(
listener
->
soft_key_set_set
)
{
message
=
switch_core_hash_find
(
listener
->
profile
->
soft_key_set_sets_hash
,
listener
->
soft_key_set_set
);
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Soft Key Set Request with Set (%s)
\n
"
,
listener
->
soft_key_set_set
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Soft Key Set Request with Set (%s)
\n
"
,
listener
->
soft_key_set_set
);
}
}
if
(
!
message
)
{
message
=
switch_core_hash_find
(
listener
->
profile
->
soft_key_set_sets_hash
,
"default"
);
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Soft Key Set Request with Set (%s)
\n
"
,
"default"
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Soft Key Set Request with Set (%s)
\n
"
,
"default"
);
}
}
if
(
message
)
{
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_FALSE
);
...
...
@@ -2231,7 +2241,9 @@ switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, sk
message
->
data
.
soft_key_template
.
soft_key
[
i
].
soft_key_event
=
soft_key_template_default_events
[
i
];
}
skinny_log_l_msg
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Soft Key Template Request with Default Template
\n
"
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_msg
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Soft Key Template Request with Default Template
\n
"
);
}
skinny_send_reply_quiet
(
listener
,
message
,
SWITCH_TRUE
);
...
...
@@ -2254,8 +2266,10 @@ switch_status_t skinny_headset_status_message(listener_t *listener, skinny_messa
switch_safe_free
(
sql
);
}
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Update headset accessory status (%s)
\n
"
,
skinny_accessory_state2str
(
request
->
data
.
headset_status
.
mode
));
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Update headset accessory status (%s)
\n
"
,
skinny_accessory_state2str
(
request
->
data
.
headset_status
.
mode
));
}
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -2274,7 +2288,9 @@ switch_status_t skinny_handle_register_available_lines_message(listener_t *liste
{
skinny_check_data_length
(
request
,
sizeof
(
request
->
data
.
reg_lines
));
skinny_log_l_msg
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Register Available Lines
\n
"
);
if
(
listener
->
profile
->
debug
>=
9
)
{
skinny_log_l_msg
(
listener
,
SWITCH_LOG_DEBUG
,
"Handle Register Available Lines
\n
"
);
}
/* Do nothing */
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -2531,7 +2547,7 @@ switch_status_t skinny_handle_xml_alarm(listener_t *listener, skinny_message_t *
switch_event_t
*
event
=
NULL
;
char
*
tmp
=
NULL
;
skinny_log_l
(
listener
,
SWITCH_LOG_
INFO
,
"Received XML alarm (length=%d).
\n
"
,
request
->
length
);
skinny_log_l
(
listener
,
SWITCH_LOG_
DEBUG
,
"Received XML alarm (length=%d).
\n
"
,
request
->
length
);
/* skinny::xml_alarm event */
skinny_device_event
(
listener
,
&
event
,
SWITCH_EVENT_CUSTOM
,
SKINNY_EVENT_XML_ALARM
);
/* Ensure that the body is null-terminated */
...
...
@@ -2547,7 +2563,8 @@ switch_status_t skinny_handle_xml_alarm(listener_t *listener, skinny_message_t *
switch_status_t
skinny_handle_request
(
listener_t
*
listener
,
skinny_message_t
*
request
)
{
if
(
listener
->
profile
->
debug
>=
10
||
request
->
type
!=
KEEP_ALIVE_MESSAGE
)
{
if
(
listener
->
profile
->
debug
>=
10
||
(
listener
->
profile
->
debug
>=
9
&&
request
->
type
!=
KEEP_ALIVE_MESSAGE
))
{
skinny_log_l
(
listener
,
SWITCH_LOG_DEBUG
,
"Received %s (type=%x,length=%d).
\n
"
,
skinny_message_type2str
(
request
->
type
),
request
->
type
,
request
->
length
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论