Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b3b2c375
提交
b3b2c375
authored
5月 18, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-3983 --resolve
上级
bcd7a162
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
22 行增加
和
17 行删除
+22
-17
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+22
-17
没有找到文件。
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
b3b2c375
...
@@ -90,6 +90,9 @@ struct presence_helper {
...
@@ -90,6 +90,9 @@ struct presence_helper {
switch_event_t
*
event
;
switch_event_t
*
event
;
switch_stream_handle_t
stream
;
switch_stream_handle_t
stream
;
char
last_uuid
[
512
];
char
last_uuid
[
512
];
int
hup
;
int
calls_up
;
};
};
switch_status_t
sofia_presence_chat_send
(
switch_event_t
*
message_event
)
switch_status_t
sofia_presence_chat_send
(
switch_event_t
*
message_event
)
...
@@ -1170,11 +1173,6 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
...
@@ -1170,11 +1173,6 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
#endif
#endif
if
(
hup
&&
dh
.
hits
>
0
)
{
goto
done
;
}
if
(
zstr
(
call_id
)
&&
(
dh
.
hits
&&
presence_source
&&
(
!
strcasecmp
(
presence_source
,
"register"
)
||
switch_stristr
(
"register"
,
status
))))
{
if
(
zstr
(
call_id
)
&&
(
dh
.
hits
&&
presence_source
&&
(
!
strcasecmp
(
presence_source
,
"register"
)
||
switch_stristr
(
"register"
,
status
))))
{
goto
done
;
goto
done
;
}
}
...
@@ -1259,7 +1257,8 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
...
@@ -1259,7 +1257,8 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
}
}
helper
.
hup
=
hup
;
helper
.
calls_up
=
dh
.
hits
;
helper
.
profile
=
profile
;
helper
.
profile
=
profile
;
helper
.
event
=
event
;
helper
.
event
=
event
;
SWITCH_STANDARD_STREAM
(
helper
.
stream
);
SWITCH_STANDARD_STREAM
(
helper
.
stream
);
...
@@ -2437,6 +2436,10 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
...
@@ -2437,6 +2436,10 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
is_dialog
=
!
strcmp
(
event
,
"dialog"
);
is_dialog
=
!
strcmp
(
event
,
"dialog"
);
if
(
helper
->
hup
&&
helper
->
calls_up
>
0
&&
(
!
is_dialog
||
!
user_agent
||
!
switch_stristr
(
"polycom"
,
user_agent
)
||
!
switch_stristr
(
"snom"
,
user_agent
)))
{
goto
end
;
}
if
(
helper
->
event
)
{
if
(
helper
->
event
)
{
switch_stream_handle_t
stream
=
{
0
};
switch_stream_handle_t
stream
=
{
0
};
const
char
*
direction
=
switch_str_nil
(
switch_event_get_header
(
helper
->
event
,
"presence-call-direction"
));
const
char
*
direction
=
switch_str_nil
(
switch_event_get_header
(
helper
->
event
,
"presence-call-direction"
));
...
@@ -2456,6 +2459,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
...
@@ -2456,6 +2459,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
int
force_status
=
0
;
int
force_status
=
0
;
const
char
*
call_state
=
switch_event_get_header
(
helper
->
event
,
"channel-state"
);
const
char
*
call_state
=
switch_event_get_header
(
helper
->
event
,
"channel-state"
);
char
*
call_info_state
=
switch_event_get_header
(
helper
->
event
,
"presence-call-info-state"
);
char
*
call_info_state
=
switch_event_get_header
(
helper
->
event
,
"presence-call-info-state"
);
int
term
=
0
;
if
(
user_agent
&&
switch_stristr
(
"snom"
,
user_agent
)
&&
uuid
)
{
if
(
user_agent
&&
switch_stristr
(
"snom"
,
user_agent
)
&&
uuid
)
{
default_dialog
=
"full"
;
default_dialog
=
"full"
;
...
@@ -2463,18 +2467,21 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
...
@@ -2463,18 +2467,21 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
if
(
call_state
&&
!
strcasecmp
(
call_state
,
"cs_hangup"
))
{
if
(
call_state
&&
!
strcasecmp
(
call_state
,
"cs_hangup"
))
{
astate
=
"hangup"
;
astate
=
"hangup"
;
}
holding
=
0
;
term
=
1
;
}
else
{
if
(
event_status
&&
!
strncasecmp
(
event_status
,
"hold"
,
4
))
{
if
(
event_status
&&
!
strncasecmp
(
event_status
,
"hold"
,
4
))
{
holding
=
1
;
holding
=
1
;
}
}
if
(
force_event_status
&&
!
event_status
)
{
if
(
force_event_status
&&
!
event_status
)
{
event_status
=
force_event_status
;
event_status
=
force_event_status
;
}
}
if
(
event_status
&&
!
strncasecmp
(
event_status
,
"hold"
,
4
))
{
if
(
event_status
&&
!
strncasecmp
(
event_status
,
"hold"
,
4
))
{
holding
=
1
;
holding
=
1
;
}
}
}
if
(
!
strcasecmp
(
direction
,
"inbound"
))
{
if
(
!
strcasecmp
(
direction
,
"inbound"
))
{
...
@@ -2701,8 +2708,6 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
...
@@ -2701,8 +2708,6 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
open
=
"open"
;
open
=
"open"
;
if
(
switch_false
(
resub
))
{
if
(
switch_false
(
resub
))
{
int
term
;
const
char
*
direction
=
switch_event_get_header
(
helper
->
event
,
"Caller-Direction"
);
const
char
*
direction
=
switch_event_get_header
(
helper
->
event
,
"Caller-Direction"
);
const
char
*
op
,
*
what
=
"Ring"
;
const
char
*
op
,
*
what
=
"Ring"
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论