Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
bf89fbd8
提交
bf89fbd8
authored
7月 03, 2013
作者:
Ken Rice
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--resolve FS-5432
上级
fe27589a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
30 行增加
和
0 行删除
+30
-0
internal.xml
conf/vanilla/sip_profiles/internal.xml
+4
-0
sofia.conf.xml
src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
+4
-0
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-0
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+8
-0
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+13
-0
没有找到文件。
conf/vanilla/sip_profiles/internal.xml
浏览文件 @
bf89fbd8
...
...
@@ -311,6 +311,10 @@
<!--force suscription expires to a lower value than requested-->
<!--<param name="force-subscription-expires" value="60"/>-->
<!-- add a random deviation to the expires value of the 202 Accepted -->
<!--<param name="sip-subscription-max-deviation" value="120"/>-->
<!-- disable register and transfer which may be undesirable in a public switch -->
<!--<param name="disable-transfer" value="true"/>-->
<!--<param name="disable-register" value="true"/>-->
...
...
src/mod/endpoints/mod_sofia/conf/sofia.conf.xml
浏览文件 @
bf89fbd8
...
...
@@ -353,6 +353,10 @@
<!-- force suscription expires to a lower value than requested -->
<!-- <param name="force-subscription-expires" value="60"/> -->
<!-- add a random deviation to the expires value of the 202 Accepted -->
<!--<param name="sip-subscription-max-deviation" value="120"/>-->
<!-- disable register and transfer which may be undesirable in a public
switch -->
<!-- <param name="disable-transfer" value="true"/> -->
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
bf89fbd8
...
...
@@ -672,6 +672,7 @@ struct sofia_profile {
su_strlst_t
*
tls_verify_in_subjects
;
uint32_t
sip_force_expires
;
uint32_t
sip_expires_max_deviation
;
uint32_t
sip_subscription_max_deviation
;
int
ireg_seconds
;
sofia_paid_type_t
paid_type
;
uint32_t
rtp_digit_delay
;
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
bf89fbd8
...
...
@@ -3685,6 +3685,7 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
profile
->
rtp_digit_delay
=
40
;
profile
->
sip_force_expires
=
0
;
profile
->
sip_expires_max_deviation
=
0
;
profile
->
sip_subscription_max_deviation
=
0
;
profile
->
tls_version
=
0
;
profile
->
tls_timeout
=
300
;
profile
->
mflags
=
MFLAG_REFER
|
MFLAG_REGISTER
;
...
...
@@ -4635,6 +4636,13 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
}
else
{
profile
->
sip_expires_max_deviation
=
0
;
}
}
else
if
(
!
strcasecmp
(
var
,
"sip-subscription-max-deviation"
))
{
int32_t
sip_subscription_max_deviation
=
atoi
(
val
);
if
(
sip_subscription_max_deviation
>=
0
)
{
profile
->
sip_subscription_max_deviation
=
sip_subscription_max_deviation
;
}
else
{
profile
->
sip_subscription_max_deviation
=
0
;
}
}
else
if
(
!
strcasecmp
(
var
,
"reuse-connections"
))
{
switch_bool_t
value
=
switch_true
(
val
);
if
(
!
value
)
{
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
bf89fbd8
...
...
@@ -3516,6 +3516,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
long
exp_delta
=
0
;
char
exp_delta_str
[
30
]
=
""
;
uint32_t
sub_max_deviation_var
=
0
;
sip_to_t
const
*
to
;
const
char
*
from_user
=
NULL
,
*
from_host
=
NULL
;
const
char
*
to_user
=
NULL
,
*
to_host
=
NULL
;
...
...
@@ -3615,6 +3616,18 @@ void sofia_presence_handle_sip_i_subscribe(int status,
}
}
if
((
sub_max_deviation_var
=
profile
->
sip_subscription_max_deviation
))
{
if
(
sub_max_deviation_var
>
0
)
{
int
sub_deviation
;
srand
(
(
unsigned
)
(
(
unsigned
)(
intptr_t
)
switch_thread_self
()
+
switch_micro_time_now
()
)
);
/* random negative number between 0 and negative sub_max_deviation_var: */
sub_deviation
=
(
rand
()
%
sub_max_deviation_var
)
-
sub_max_deviation_var
;
if
(
(
exp_delta
+
sub_deviation
)
>
45
)
{
exp_delta
+=
sub_deviation
;
}
}
}
if
(
mod_sofia_globals
.
debug_presence
>
0
||
mod_sofia_globals
.
debug_sla
>
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"DELTA %ld
\n
"
,
exp_delta
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论