Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d6193433
提交
d6193433
authored
9月 08, 2012
作者:
Raymond Chandler
提交者:
Ken Rice
9月 11, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-4558 --resolve
上级
25bd5759
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
14 行删除
+12
-14
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+7
-14
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+5
-0
没有找到文件。
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
d6193433
...
...
@@ -4473,7 +4473,7 @@ static switch_status_t conference_say(conference_obj_t *conference, const char *
}
/* send a message to every member of the conference */
static
void
chat_message_broadcast
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
const
char
*
data
,
const
char
*
chat_from
)
static
void
chat_message_broadcast
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
const
char
*
data
,
const
char
*
chat_from
,
const
char
*
ouuid
)
{
conference_member_t
*
member
=
NULL
;
char
*
argv
[
2
]
=
{
0
};
...
...
@@ -4490,25 +4490,15 @@ static void chat_message_broadcast(conference_obj_t *conference, switch_stream_h
msg
.
message_id
=
SWITCH_MESSAGE_INDICATE_MESSAGE
;
msg
.
string_array_arg
[
2
]
=
data
;
msg
.
string_array_arg
[
3
]
=
ouuid
;
msg
.
from
=
__FILE__
;
switch_mutex_lock
(
conference
->
member_mutex
);
for
(
member
=
conference
->
members
;
member
;
member
=
member
->
next
)
{
if
(
member
->
session
&&
!
switch_test_flag
(
member
,
MFLAG_NOCHANNEL
))
{
switch_core_session_t
*
lsession
=
NULL
;
switch_channel_t
*
channel
=
NULL
;
switch_caller_profile_t
*
caller_profile
=
NULL
;
lsession
=
member
->
session
;
channel
=
switch_core_session_get_channel
(
lsession
);
caller_profile
=
switch_channel_get_caller_profile
(
channel
);
if
(
!
strcmp
(
argv
[
0
],
caller_profile
->
username
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"not sending message to sender [%s]
\n
"
,
chat_from
);
continue
;
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"sending message to [%s]
\n
"
,
caller_profile
->
username
);
}
switch_core_session_receive_message
(
lsession
,
&
msg
);
}
...
...
@@ -7866,6 +7856,7 @@ static switch_status_t chat_send(switch_event_t *message_event)
const
char
*
body
;
//const char *type;
const
char
*
hint
;
const
char
*
ouuid
;
proto
=
switch_event_get_header
(
message_event
,
"proto"
);
from
=
switch_event_get_header
(
message_event
,
"from"
);
...
...
@@ -7874,6 +7865,7 @@ static switch_status_t chat_send(switch_event_t *message_event)
body
=
switch_event_get_body
(
message_event
);
//type = switch_event_get_header(message_event, "type");
hint
=
switch_event_get_header
(
message_event
,
"hint"
);
ouuid
=
switch_event_get_header
(
message_event
,
"Channel-Call-UUID"
);
if
((
p
=
strchr
(
to
,
'+'
)))
{
to
=
++
p
;
...
...
@@ -7890,7 +7882,8 @@ static switch_status_t chat_send(switch_event_t *message_event)
}
if
(
!
(
conference
=
conference_find
(
name
,
NULL
)))
{
switch_core_chat_send_args
(
proto
,
CONF_CHAT_PROTO
,
to
,
hint
&&
strchr
(
hint
,
'/'
)
?
hint
:
from
,
""
,
"Conference not active."
,
NULL
,
NULL
,
SWITCH_FALSE
);
switch_core_chat_send_args
(
proto
,
CONF_CHAT_PROTO
,
to
,
hint
&&
strchr
(
hint
,
'/'
)
?
hint
:
from
,
""
,
"Conference not active."
,
NULL
,
NULL
,
SWITCH_FALSE
);
return
SWITCH_STATUS_FALSE
;
}
...
...
@@ -7899,7 +7892,7 @@ static switch_status_t chat_send(switch_event_t *message_event)
if
(
body
!=
NULL
&&
(
lbuf
=
strdup
(
body
)))
{
/* special case list */
if
(
conference
->
broadcast_chat_messages
)
{
chat_message_broadcast
(
conference
,
&
stream
,
body
,
from
);
chat_message_broadcast
(
conference
,
&
stream
,
body
,
from
,
ouuid
);
}
else
if
(
switch_stristr
(
"list"
,
lbuf
))
{
conference_list_pretty
(
conference
,
&
stream
);
/* provide help */
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
d6193433
...
...
@@ -2137,6 +2137,11 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
char
*
ct
=
"text/plain"
;
int
ok
=
0
;
if
(
!
zstr
(
msg
->
string_array_arg
[
3
])
&&
!
strcmp
(
msg
->
string_array_arg
[
3
],
tech_pvt
->
caller_profile
->
uuid
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"Not sending message back to sender
\n
"
);
break
;
}
if
(
!
zstr
(
msg
->
string_array_arg
[
0
])
&&
!
zstr
(
msg
->
string_array_arg
[
1
]))
{
ct
=
switch_core_session_sprintf
(
session
,
"%s/%s"
,
msg
->
string_array_arg
[
0
],
msg
->
string_array_arg
[
1
]);
ok
=
1
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论