Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
aba31597
提交
aba31597
authored
1月 15, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-4910 this too
上级
a46c8972
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
14 行删除
+10
-14
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+10
-14
没有找到文件。
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
aba31597
...
...
@@ -866,20 +866,18 @@ static void do_dialog_probe(switch_event_t *event)
}
sql
=
switch_mprintf
(
"update sip_subscriptions set version=version+1 "
"where hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and call_id='%q'"
,
mod_sofia_globals
.
hostname
,
profile
->
name
,
probe_euser
,
probe_host
,
sub_call_id
);
sql
=
switch_mprintf
(
"update sip_subscriptions set version=version+1 where call_id='%q'"
,
sub_call_id
);
if
(
mod_sofia_globals
.
debug_presence
>
1
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"%s DUMP DIALOG_PROBE set version sql:
\n
%s
\n
"
,
profile
->
name
,
sql
);
}
sofia_glue_execute_sql_
soon
(
profile
,
&
sql
,
SWITCH_TRUE
);
sofia_glue_execute_sql_
now
(
profile
,
&
sql
,
SWITCH_TRUE
);
switch_safe_free
(
sql
);
// The dialog_probe_callback has built up the dialogs to be included in the NOTIFY.
// Now send the "full" dialog event to the triggering subscription.
sql
=
switch_mprintf
(
"select call_id,expires,sub_to_user,sub_to_host,event,version
+1
, "
sql
=
switch_mprintf
(
"select call_id,expires,sub_to_user,sub_to_host,event,version, "
"'full',full_to,full_from,contact,network_ip,network_port "
"from sip_subscriptions "
"where hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and call_id='%q'"
,
...
...
@@ -1387,7 +1385,7 @@ static switch_event_t *actual_sofia_presence_event_handler(switch_event_t *event
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"PRES SQL %s
\n
"
,
sql
);
}
sofia_glue_execute_sql_
soon
(
profile
,
&
sql
,
SWITCH_TRUE
);
sofia_glue_execute_sql_
now
(
profile
,
&
sql
,
SWITCH_TRUE
);
...
...
@@ -1397,7 +1395,7 @@ static switch_event_t *actual_sofia_presence_event_handler(switch_event_t *event
"sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,"
"sip_subscriptions.accept,sip_subscriptions.profile_name"
",'%q','%q','%q',sip_presence.status,sip_presence.rpid,sip_presence.open_closed,'%q','%q',"
"sip_subscriptions.version
+1
, '%q',sip_subscriptions.orig_proto,sip_subscriptions.full_to,"
"sip_subscriptions.version, '%q',sip_subscriptions.orig_proto,sip_subscriptions.full_to,"
"sip_subscriptions.network_ip, sip_subscriptions.network_port "
"from sip_subscriptions "
"left join sip_presence on "
...
...
@@ -1418,15 +1416,15 @@ static switch_event_t *actual_sofia_presence_event_handler(switch_event_t *event
}
else
{
sql
=
switch_mprintf
(
"update sip_subscriptions set version=version+1 where sip_subscriptions.event != 'line-seize' and "
"
hostname='%q' and profile_name = '%q' and sip_subscriptions.call_id='%q'"
,
mod_sofia_globals
.
hostname
,
profile
->
name
,
call_id
);
"
sip_subscriptions.call_id='%q'"
,
call_id
);
if
(
mod_sofia_globals
.
debug_presence
>
1
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"PRES SQL %s
\n
"
,
sql
);
}
sofia_glue_execute_sql_
soon
(
profile
,
&
sql
,
SWITCH_TRUE
);
sofia_glue_execute_sql_
now
(
profile
,
&
sql
,
SWITCH_TRUE
);
sql
=
switch_mprintf
(
"select distinct sip_subscriptions.proto,sip_subscriptions.sip_user,sip_subscriptions.sip_host,"
...
...
@@ -1435,7 +1433,7 @@ static switch_event_t *actual_sofia_presence_event_handler(switch_event_t *event
"sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,"
"sip_subscriptions.accept,sip_subscriptions.profile_name"
",'%q','%q','%q',sip_presence.status,sip_presence.rpid,sip_presence.open_closed,'%q','%q',"
"sip_subscriptions.version
+1
, '%q',sip_subscriptions.orig_proto,sip_subscriptions.full_to,"
"sip_subscriptions.version, '%q',sip_subscriptions.orig_proto,sip_subscriptions.full_to,"
"sip_subscriptions.network_ip, sip_subscriptions.network_port "
"from sip_subscriptions "
"left join sip_presence on "
...
...
@@ -2505,8 +2503,6 @@ static char *gen_pidf(char *user_agent, char *id, char *url, char *open, char *r
return
ret
;
}
static
int
sofia_presence_sub_callback
(
void
*
pArg
,
int
argc
,
char
**
argv
,
char
**
columnNames
)
{
struct
presence_helper
*
helper
=
(
struct
presence_helper
*
)
pArg
;
...
...
@@ -4577,7 +4573,7 @@ void sofia_presence_check_subscriptions(sofia_profile_t *profile, time_t now)
"((expires > 0 and expires <= %ld)) and profile_name='%q' and hostname='%q'"
,
(
long
)
now
,
profile
->
name
,
mod_sofia_globals
.
hostname
);
sofia_glue_execute_sql_
soon
(
profile
,
&
sql
,
SWITCH_TRUE
);
sofia_glue_execute_sql_
now
(
profile
,
&
sql
,
SWITCH_TRUE
);
switch_safe_free
(
sql
);
sql
=
switch_mprintf
(
"select full_to, full_from, contact, -1, call_id, event, network_ip, network_port, "
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论