Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8862fbc3
提交
8862fbc3
authored
2月 28, 2014
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5461 --resolve you tricked me I said make 1 patch with all of it
上级
5ed78f89
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
42 行增加
和
1 行删除
+42
-1
conference.conf.xml
.../mod_conference/conf/autoload_configs/conference.conf.xml
+2
-0
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+40
-1
没有找到文件。
src/mod/applications/mod_conference/conf/autoload_configs/conference.conf.xml
浏览文件 @
8862fbc3
...
...
@@ -90,6 +90,8 @@
<param
name=
"exit-sound"
value=
"tone_stream://%(500,0,300,200,100,50,25)"
/>
<!-- File to play when you are ejected from the conference -->
<param
name=
"kicked-sound"
value=
"conference/conf-kicked.wav"
/>
<!-- File to play when try to join a non-existing conference with "join-only" flag -->
<!-- <param name="join-only-sound" value="conference/conf-joinonly.wav"/> -->
<!-- File to play when the conference is locked -->
<param
name=
"locked-sound"
value=
"conference/conf-locked.wav"
/>
<!-- File to play when the conference is locked during the call-->
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
8862fbc3
...
...
@@ -188,7 +188,8 @@ typedef enum {
MFLAG_PAUSE_RECORDING
=
(
1
<<
22
),
MFLAG_ACK_VIDEO
=
(
1
<<
23
),
MFLAG_TOOL
=
(
1
<<
24
),
MFLAG_GHOST = (1 << 25)
MFLAG_GHOST
=
(
1
<<
25
),
MFLAG_JOIN_ONLY
=
(
1
<<
26
)
}
member_flag_t
;
typedef
enum
{
...
...
@@ -332,6 +333,7 @@ typedef struct conference_obj {
char
*
is_locked_sound
;
char
*
is_unlocked_sound
;
char
*
kicked_sound
;
char
*
join_only_sound
;
char
*
caller_id_name
;
char
*
caller_id_number
;
char
*
sound_prefix
;
...
...
@@ -7888,6 +7890,8 @@ static void set_mflags(const char *flags, member_flag_t *f)
*
f
|=
MFLAG_VIDEO_BRIDGE
;
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"ghost"
))
{
*
f
|=
MFLAG_GHOST
;
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"join-only"
))
{
*
f
|=
MFLAG_JOIN_ONLY
;
}
}
...
...
@@ -8360,6 +8364,34 @@ SWITCH_STANDARD_APP(conference_function)
const
char
*
endconf_grace_time_str
;
const
char
*
auto_record_str
;
/* no conference yet, so check for join-only flag */
if
(
flags_str
)
{
set_mflags
(
flags_str
,
&
mflags
);
if
(
mflags
&
MFLAG_JOIN_ONLY
)
{
switch_event_t
*
event
;
switch_xml_t
jos_xml
;
char
*
val
;
/* send event */
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
CONF_EVENT_MAINT
);
switch_channel_event_set_basic_data
(
channel
,
event
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Conference-Name"
,
conf_name
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Conference-Profile-Name"
,
profile_name
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Action"
,
"rejected-join-only"
);
switch_event_fire
(
&
event
);
/* check what sound file to play */
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"Cannot create a conference since join-only flag is set
\n
"
);
jos_xml
=
switch_xml_find_child
(
xml_cfg
.
profile
,
"param"
,
"name"
,
"join-only-sound"
);
if
(
jos_xml
&&
(
val
=
(
char
*
)
switch_xml_attr_soft
(
jos_xml
,
"value"
)))
{
switch_channel_answer
(
channel
);
switch_ivr_play_file
(
session
,
NULL
,
val
,
NULL
);
}
if
(
!
switch_false
(
switch_channel_get_variable
(
channel
,
"hangup_after_conference"
)))
{
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_NORMAL_CLEARING
);
}
goto
done
;
}
}
/* couldn't find the conference, create one */
conference
=
conference_new
(
conf_name
,
xml_cfg
,
session
,
NULL
);
...
...
@@ -8967,6 +8999,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
char
*
is_locked_sound
=
NULL
;
char
*
is_unlocked_sound
=
NULL
;
char
*
kicked_sound
=
NULL
;
char
*
join_only_sound
=
NULL
;
char
*
pin
=
NULL
;
char
*
mpin
=
NULL
;
char
*
pin_sound
=
NULL
;
...
...
@@ -9139,6 +9172,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
cdr_event_mode
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"kicked-sound"
)
&&
!
zstr
(
val
))
{
kicked_sound
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"join-only-sound"
)
&&
!
zstr
(
val
))
{
join_only_sound
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"pin"
)
&&
!
zstr
(
val
))
{
pin
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"moderator-pin"
)
&&
!
zstr
(
val
))
{
...
...
@@ -9386,6 +9421,10 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
conference
->
kicked_sound
=
switch_core_strdup
(
conference
->
pool
,
kicked_sound
);
}
if
(
!
zstr
(
join_only_sound
))
{
conference
->
join_only_sound
=
switch_core_strdup
(
conference
->
pool
,
join_only_sound
);
}
if
(
!
zstr
(
pin_sound
))
{
conference
->
pin_sound
=
switch_core_strdup
(
conference
->
pool
,
pin_sound
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论