Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
cfa926d7
提交
cfa926d7
authored
1月 10, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add sub_host to the sip_registrations table to keep track of the original host
上级
61917bb5
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
12 行删除
+14
-12
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+4
-2
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+7
-7
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+3
-3
没有找到文件。
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
cfa926d7
...
...
@@ -5894,7 +5894,8 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
" mwi_user VARCHAR(255),
\n
"
" mwi_host VARCHAR(255),
\n
"
" orig_server_host VARCHAR(255),
\n
"
" orig_hostname VARCHAR(255)
\n
"
" orig_hostname VARCHAR(255),
\n
"
" sub_host VARCHAR(255)
\n
"
");
\n
"
;
char
recovery_sql
[]
=
...
...
@@ -6011,6 +6012,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
"create index sr_call_id on sip_registrations (call_id)"
,
"create index sr_sip_user on sip_registrations (sip_user)"
,
"create index sr_sip_host on sip_registrations (sip_host)"
,
"create index sr_sub_host on sip_registrations (sub_host)"
,
"create index sr_mwi_user on sip_registrations (mwi_user)"
,
"create index sr_mwi_host on sip_registrations (mwi_host)"
,
"create index sr_profile_name on sip_registrations (profile_name)"
,
...
...
@@ -6094,7 +6096,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
"or status like '%%TCP%%' or status like '%%TLS%%') and hostname='%q' "
"and network_ip like '%%' and network_port like '%%' and sip_username "
"like '%%' and mwi_user like '%%' and mwi_host like '%%' "
"and orig_server_host like '%%' and orig_hostname like '%%'"
,
mod_sofia_globals
.
hostname
);
"and orig_server_host like '%%' and orig_hostname like '%%'
and sub_host like '%%'
"
,
mod_sofia_globals
.
hostname
);
switch_cache_db_test_reactive
(
dbh
,
test_sql
,
"drop table sip_registrations"
,
reg_sql
);
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
cfa926d7
...
...
@@ -631,7 +631,7 @@ static void do_normal_probe(sofia_profile_t *profile, switch_event_t *event)
switch_safe_free
(
sql
);
sql
=
switch_mprintf
(
"select sip_registrations.sip_user, "
"sip_registrations.s
ip
_host, "
"sip_registrations.s
ub
_host, "
"sip_registrations.status, "
"sip_registrations.rpid, "
"'', "
...
...
@@ -649,15 +649,15 @@ static void do_normal_probe(sofia_profile_t *profile, switch_event_t *event)
"from sip_registrations "
"left join sip_dialogs on "
"sip_dialogs.presence_id = sip_registrations.sip_user %q '@' %q sip_registrations.s
ip
_host "
"sip_dialogs.presence_id = sip_registrations.sip_user %q '@' %q sip_registrations.s
ub
_host "
"or (sip_dialogs.sip_from_user = sip_registrations.sip_user "
"and sip_dialogs.sip_from_host = sip_registrations.s
ip
_host) "
"and sip_dialogs.sip_from_host = sip_registrations.s
ub
_host) "
"left join sip_presence on "
"(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_server_host=sip_presence.sip_
host
and "
"(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_server_host=sip_presence.sip_
server
and "
"sip_registrations.profile_name=sip_presence.profile_name) "
"where sip_dialogs.presence_id='%q@%q' or (sip_registrations.sip_user='%q' and "
"(sip_registrations.orig_server_host='%q' or sip_registrations.s
ip
_host='%q' "
"(sip_registrations.orig_server_host='%q' or sip_registrations.s
ub
_host='%q' "
"or sip_registrations.presence_hosts like '%%%q%%'))"
,
dh
.
status
,
dh
.
rpid
,
switch_sql_concat
(),
switch_sql_concat
(),
...
...
@@ -766,9 +766,9 @@ static void do_dialog_probe(sofia_profile_t *profile, switch_event_t *event)
"left join sip_registrations on "
"(sip_dialogs.sip_from_user = sip_registrations.sip_user "
"and (sip_dialogs.sip_from_host = sip_registrations.orig_server_host or "
"sip_dialogs.sip_from_host = sip_registrations.s
ip
_host) ) "
"sip_dialogs.sip_from_host = sip_registrations.s
ub
_host) ) "
"where sip_dialogs.presence_id='%q@%q' or (sip_registrations.sip_user='%q' and "
"(sip_registrations.orig_server_host='%q' or sip_registrations.s
ip
_host='%q' "
"(sip_registrations.orig_server_host='%q' or sip_registrations.s
ub
_host='%q' "
"or sip_registrations.presence_hosts like '%%%q%%'))"
,
probe_euser
,
probe_host
,
sub_call_id
,
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
cfa926d7
...
...
@@ -1548,12 +1548,12 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
sql
=
switch_mprintf
(
"insert into sip_registrations "
"(call_id,sip_user,sip_host,presence_hosts,contact,status,rpid,expires,"
"user_agent,server_user,server_host,profile_name,hostname,network_ip,network_port,sip_username,sip_realm,"
"mwi_user,mwi_host, orig_server_host, orig_hostname) "
"values ('%q','%q', '%q','%q','%q','%q', '%q', %ld, '%q', '%q', '%q', '%q', '%q', '%q', '%q','%q','%q','%q','%q','%q','%q')"
,
"mwi_user,mwi_host, orig_server_host, orig_hostname
, sub_host
) "
"values ('%q','%q', '%q','%q','%q','%q', '%q', %ld, '%q', '%q', '%q', '%q', '%q', '%q', '%q','%q','%q','%q','%q','%q','%q'
,'%q'
)"
,
call_id
,
to_user
,
reg_host
,
profile
->
presence_hosts
?
profile
->
presence_hosts
:
reg_host
,
contact_str
,
reg_desc
,
rpid
,
(
long
)
switch_epoch_time_now
(
NULL
)
+
(
long
)
exptime
+
60
,
agent
,
from_user
,
guess_ip4
,
profile
->
name
,
mod_sofia_globals
.
hostname
,
network_ip
,
network_port_c
,
username
,
realm
,
mwi_user
,
mwi_host
,
guess_ip4
,
mod_sofia_globals
.
hostname
);
mwi_user
,
mwi_host
,
guess_ip4
,
mod_sofia_globals
.
hostname
,
sub_host
);
}
else
{
sql
=
switch_mprintf
(
"update sip_registrations set expires = %ld where sip_user='%q' and sip_host='%q' and contact='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
)
+
(
long
)
exptime
+
60
,
to_user
,
reg_host
,
contact_str
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论