Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8daaec38
提交
8daaec38
authored
1月 03, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-3794 remove delete-subs-on-register param and some tweaks based on this bug report
上级
959e4ab2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
53 行删除
+12
-53
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+0
-12
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+10
-6
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+1
-34
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
8daaec38
...
...
@@ -247,7 +247,7 @@ typedef enum {
PFLAG_T38_PASSTHRU
,
PFLAG_CID_IN_1XX
,
PFLAG_IN_DIALOG_CHAT
,
PFLAG_DEL_SUBS_ON_REG
,
PFLAG_DEL_SUBS_ON_REG
_REUSE
,
PFLAG_IGNORE_183NOSDP
,
PFLAG_PRESENCE_PROBE_ON_REGISTER
,
PFLAG_PRESENCE_ON_REGISTER
,
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
8daaec38
...
...
@@ -2921,12 +2921,6 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_PASS_CALLEE_ID
);
}
}
else
if
(
!
strcasecmp
(
var
,
"delete-subs-on-register"
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_DEL_SUBS_ON_REG
);
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_DEL_SUBS_ON_REG
);
}
}
else
if
(
!
strcasecmp
(
var
,
"watchdog-enabled"
))
{
profile
->
watchdog_enabled
=
switch_true
(
val
);
}
else
if
(
!
strcasecmp
(
var
,
"watchdog-step-timeout"
))
{
...
...
@@ -3779,12 +3773,6 @@ switch_status_t config_sofia(int reload, char *profile_name)
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_IN_DIALOG_CHAT
);
}
}
else
if
(
!
strcasecmp
(
var
,
"delete-subs-on-register"
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_DEL_SUBS_ON_REG
);
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_DEL_SUBS_ON_REG
);
}
}
else
if
(
!
strcasecmp
(
var
,
"t38-passthru"
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_T38_PASSTHRU
);
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
8daaec38
...
...
@@ -2877,25 +2877,25 @@ void sofia_presence_handle_sip_i_subscribe(int status,
proto
=
alt_proto
;
}
if
((
sub_state
==
nua_substate_active
)
&&
(
switch_stristr
(
"dialog"
,
(
const
char
*
)
event
))
)
{
if
((
sub_state
==
nua_substate_active
))
{
sstr
=
switch_mprintf
(
"active;expires=%ld"
,
exp_delta
);
sql
=
switch_mprintf
(
"update sip_subscriptions "
"set expires=%ld "
"where call_id='%q'
and event='dialog' and hostname='%q'
"
,
"where call_id='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
)
+
exp_delta
,
call_id
,
mod_sofia_globals
.
hostname
);
call_id
);
if
(
mod_sofia_globals
.
debug_presence
>
0
||
mod_sofia_globals
.
debug_sla
>
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"re-subscribe
with dialog detected, sql: %s
\n
"
,
sql
);
"re-subscribe
event %s, sql: %s
\n
"
,
event
,
sql
);
}
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
else
{
#if 0
if (sofia_test_pflag(profile, PFLAG_MULTIREG)) {
sql = switch_mprintf("delete from sip_subscriptions where call_id='%q' "
"or (proto='%q' and sip_user='%q' and sip_host='%q' "
...
...
@@ -2908,6 +2908,10 @@ void sofia_presence_handle_sip_i_subscribe(int status,
"proto='%q' and sip_user='%q' and sip_host='%q' and sub_to_user='%q' and sub_to_host='%q' and event='%q' and hostname='%q'",
proto, from_user, from_host, to_user, to_host, event, mod_sofia_globals.hostname);
}
#endif
sql
=
switch_mprintf
(
"delete from sip_subscriptions where call_id='%q'"
,
call_id
,
mod_sofia_globals
.
hostname
);
switch_mutex_lock
(
profile
->
ireg_mutex
);
switch_assert
(
sql
!=
NULL
);
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
8daaec38
...
...
@@ -1056,14 +1056,11 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
switch_event_t
*
auth_params
=
NULL
;
int
r
=
0
;
long
reg_count
=
0
;
int
delete_subs
;
const
char
*
agent
=
"unknown"
;
const
char
*
pres_on_reg
=
NULL
;
int
send_pres
=
0
;
int
is_tls
=
0
,
is_tcp
=
0
;
delete_subs
=
sofia_test_pflag
(
profile
,
PFLAG_DEL_SUBS_ON_REG
);
if
(
v_event
&&
*
v_event
)
pres_on_reg
=
switch_event_get_header
(
*
v_event
,
"send-presence-on-register"
);
if
(
!
(
send_pres
=
switch_true
(
pres_on_reg
)))
{
...
...
@@ -1504,16 +1501,6 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
}
if
(
auth_res
!=
AUTH_RENEWED
)
{
if
(
multi_reg
)
{
if
(
delete_subs
)
{
if
(
reg_count
==
1
)
{
sql
=
switch_mprintf
(
"update sip_subscriptions set expires=%ld where sip_user='%q' and sip_host='%q' and contact='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
),
to_user
,
sub_host
,
contact_str
);
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
}
if
(
multi_reg_contact
)
{
sql
=
switch_mprintf
(
"delete from sip_registrations where sip_user='%q' and sip_host='%q' and contact='%q'"
,
to_user
,
reg_host
,
contact_str
);
...
...
@@ -1521,10 +1508,6 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
sql
=
switch_mprintf
(
"delete from sip_registrations where call_id='%q'"
,
call_id
);
}
}
else
{
if
(
delete_subs
)
{
sql
=
switch_mprintf
(
"delete from sip_subscriptions where sip_user='%q' and sip_host='%q'"
,
to_user
,
sub_host
);
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
sql
=
switch_mprintf
(
"delete from sip_registrations where sip_user='%q' and sip_host='%q'"
,
to_user
,
reg_host
);
}
switch_mutex_lock
(
profile
->
ireg_mutex
);
...
...
@@ -1684,17 +1667,6 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
if
((
p
=
strchr
(
icontact
+
4
,
':'
)))
{
*
p
=
'\0'
;
}
if
(
delete_subs
)
{
if
(
multi_reg_contact
)
{
sql
=
switch_mprintf
(
"update sip_subscriptions set expires=%ld where sip_user='%q' and sip_host='%q' and contact='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
),
to_user
,
sub_host
,
contact_str
);
}
else
{
sql
=
switch_mprintf
(
"update sip_subscriptions set expires=%ld where call_id='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
),
call_id
);
}
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
if
(
multi_reg_contact
)
{
sql
=
...
...
@@ -1707,12 +1679,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
switch_safe_free
(
icontact
);
}
else
{
if
(
delete_subs
)
{
if
((
sql
=
switch_mprintf
(
"update sip_subscriptions set expires=%ld where sip_user='%q' and sip_host='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
),
to_user
,
sub_host
)))
{
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
}
if
((
sql
=
switch_mprintf
(
"delete from sip_registrations where sip_user='%q' and sip_host='%q'"
,
to_user
,
reg_host
)))
{
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论