Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
4d348587
提交
4d348587
authored
3月 08, 2018
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11017: [mod_conference] Add moh controls to conference #resolve
上级
08e12b23
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
61 行增加
和
4 行删除
+61
-4
conference_api.c
src/mod/applications/mod_conference/conference_api.c
+36
-0
conference_loop.c
src/mod/applications/mod_conference/conference_loop.c
+6
-0
conference_member.c
src/mod/applications/mod_conference/conference_member.c
+2
-1
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+12
-2
mod_conference.h
src/mod/applications/mod_conference/mod_conference.h
+5
-1
没有找到文件。
src/mod/applications/mod_conference/conference_api.c
浏览文件 @
4d348587
...
@@ -59,6 +59,7 @@ api_command_t conference_api_sub_commands[] = {
...
@@ -59,6 +59,7 @@ api_command_t conference_api_sub_commands[] = {
{
"position"
,
(
void_fn_t
)
&
conference_api_sub_position
,
CONF_API_SUB_MEMBER_TARGET
,
"position"
,
"<member_id> <x>:<y>:<z>"
},
{
"position"
,
(
void_fn_t
)
&
conference_api_sub_position
,
CONF_API_SUB_MEMBER_TARGET
,
"position"
,
"<member_id> <x>:<y>:<z>"
},
{
"auto-3d-position"
,
(
void_fn_t
)
&
conference_api_sub_auto_position
,
CONF_API_SUB_ARGS_SPLIT
,
"auto-3d-position"
,
"[on|off]"
},
{
"auto-3d-position"
,
(
void_fn_t
)
&
conference_api_sub_auto_position
,
CONF_API_SUB_ARGS_SPLIT
,
"auto-3d-position"
,
"[on|off]"
},
{
"play"
,
(
void_fn_t
)
&
conference_api_sub_play
,
CONF_API_SUB_ARGS_SPLIT
,
"play"
,
"<file_path> [async|<member_id> [nomux]]"
},
{
"play"
,
(
void_fn_t
)
&
conference_api_sub_play
,
CONF_API_SUB_ARGS_SPLIT
,
"play"
,
"<file_path> [async|<member_id> [nomux]]"
},
{
"moh"
,
(
void_fn_t
)
&
conference_api_sub_moh
,
CONF_API_SUB_ARGS_SPLIT
,
"moh"
,
"<file_path>|toggle|[on|off]"
},
{
"pause_play"
,
(
void_fn_t
)
&
conference_api_sub_pause_play
,
CONF_API_SUB_ARGS_SPLIT
,
"pause"
,
"[<member_id>]"
},
{
"pause_play"
,
(
void_fn_t
)
&
conference_api_sub_pause_play
,
CONF_API_SUB_ARGS_SPLIT
,
"pause"
,
"[<member_id>]"
},
{
"play_status"
,
(
void_fn_t
)
&
conference_api_sub_play_status
,
CONF_API_SUB_ARGS_SPLIT
,
"play_status"
,
"[<member_id>]"
},
{
"play_status"
,
(
void_fn_t
)
&
conference_api_sub_play_status
,
CONF_API_SUB_ARGS_SPLIT
,
"play_status"
,
"[<member_id>]"
},
{
"file_seek"
,
(
void_fn_t
)
&
conference_api_sub_file_seek
,
CONF_API_SUB_ARGS_SPLIT
,
"file_seek"
,
"[+-]<val> [<member_id>]"
},
{
"file_seek"
,
(
void_fn_t
)
&
conference_api_sub_file_seek
,
CONF_API_SUB_ARGS_SPLIT
,
"file_seek"
,
"[+-]<val> [<member_id>]"
},
...
@@ -2471,6 +2472,41 @@ switch_status_t conference_api_sub_file_seek(conference_obj_t *conference, switc
...
@@ -2471,6 +2472,41 @@ switch_status_t conference_api_sub_file_seek(conference_obj_t *conference, switc
return
SWITCH_STATUS_GENERR
;
return
SWITCH_STATUS_GENERR
;
}
}
switch_status_t
conference_api_set_moh
(
conference_obj_t
*
conference
,
const
char
*
what
)
{
if
(
!
strcasecmp
(
what
,
"toggle"
))
{
if
(
conference_utils_test_flag
(
conference
,
CFLAG_NO_MOH
))
{
conference_utils_clear_flag
(
conference
,
CFLAG_NO_MOH
);
}
else
{
conference_utils_set_flag
(
conference
,
CFLAG_NO_MOH
);
}
}
else
if
(
!
strcasecmp
(
what
,
"on"
))
{
conference_utils_clear_flag
(
conference
,
CFLAG_NO_MOH
);
}
else
if
(
!
strcasecmp
(
what
,
"off"
))
{
conference_utils_set_flag
(
conference
,
CFLAG_NO_MOH
);
}
else
if
(
!
strcasecmp
(
what
,
"reset"
))
{
conference
->
tmp_moh_sound
=
NULL
;
}
else
{
conference
->
tmp_moh_sound
=
switch_core_strdup
(
conference
->
pool
,
what
);
}
if
(
conference_utils_test_flag
(
conference
,
CFLAG_NO_MOH
)
||
conference
->
tmp_moh_sound
)
{
conference_file_stop
(
conference
,
FILE_STOP_ASYNC
);
}
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
conference_api_sub_moh
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
conference_api_set_moh
(
conference
,
argv
[
2
]);
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
conference_api_sub_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
switch_status_t
conference_api_sub_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
{
int
ret_status
=
SWITCH_STATUS_GENERR
;
int
ret_status
=
SWITCH_STATUS_GENERR
;
...
...
src/mod/applications/mod_conference/conference_loop.c
浏览文件 @
4d348587
...
@@ -45,6 +45,7 @@ struct _mapping control_mappings[] = {
...
@@ -45,6 +45,7 @@ struct _mapping control_mappings[] = {
{
"mute"
,
conference_loop_mute_toggle
},
{
"mute"
,
conference_loop_mute_toggle
},
{
"mute on"
,
conference_loop_mute_on
},
{
"mute on"
,
conference_loop_mute_on
},
{
"mute off"
,
conference_loop_mute_off
},
{
"mute off"
,
conference_loop_mute_off
},
{
"moh toggle"
,
conference_loop_moh_toggle
},
{
"vmute"
,
conference_loop_vmute_toggle
},
{
"vmute"
,
conference_loop_vmute_toggle
},
{
"vmute on"
,
conference_loop_vmute_on
},
{
"vmute on"
,
conference_loop_vmute_on
},
{
"vmute off"
,
conference_loop_vmute_off
},
{
"vmute off"
,
conference_loop_vmute_off
},
...
@@ -167,6 +168,11 @@ void conference_loop_conference_video_vmute_snapoff(conference_member_t *member,
...
@@ -167,6 +168,11 @@ void conference_loop_conference_video_vmute_snapoff(conference_member_t *member,
conference_video_vmute_snap
(
member
,
SWITCH_TRUE
);
conference_video_vmute_snap
(
member
,
SWITCH_TRUE
);
}
}
void
conference_loop_moh_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
)
{
conference_api_set_moh
(
member
->
conference
,
"toggle"
);
}
void
conference_loop_vmute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
)
void
conference_loop_vmute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
)
{
{
if
(
member
==
NULL
)
if
(
member
==
NULL
)
...
...
src/mod/applications/mod_conference/conference_member.c
浏览文件 @
4d348587
...
@@ -859,10 +859,11 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
...
@@ -859,10 +859,11 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
}
}
if
(
conference
->
count
>
1
)
{
if
(
conference
->
count
>
1
)
{
if
((
conference
->
moh_sound
&&
!
conference_utils_test_flag
(
conference
,
CFLAG_WAIT_MOD
))
||
if
((
(
conference
->
moh_sound
||
conference
->
tmp_moh_sound
)
&&
!
conference_utils_test_flag
(
conference
,
CFLAG_WAIT_MOD
))
||
(
conference_utils_test_flag
(
conference
,
CFLAG_WAIT_MOD
)
&&
!
switch_true
(
switch_channel_get_variable
(
channel
,
"conference_permanent_wait_mod_moh"
))))
{
(
conference_utils_test_flag
(
conference
,
CFLAG_WAIT_MOD
)
&&
!
switch_true
(
switch_channel_get_variable
(
channel
,
"conference_permanent_wait_mod_moh"
))))
{
/* stop MoH if any */
/* stop MoH if any */
conference_file_stop
(
conference
,
FILE_STOP_ASYNC
);
conference_file_stop
(
conference
,
FILE_STOP_ASYNC
);
conference_utils_clear_flag
(
conference
,
CFLAG_NO_MOH
);
}
}
if
(
!
switch_channel_test_app_flag_key
(
"conference_silent"
,
channel
,
CONF_SILENT_REQ
))
{
if
(
!
switch_channel_test_app_flag_key
(
"conference_silent"
,
channel
,
CONF_SILENT_REQ
))
{
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
4d348587
...
@@ -372,15 +372,25 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
...
@@ -372,15 +372,25 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
conference_member_set_floor_holder
(
conference
,
NULL
,
floor_holder
);
conference_member_set_floor_holder
(
conference
,
NULL
,
floor_holder
);
}
}
if
(
conference_utils_test_flag
(
conference
,
CFLAG_NO_MOH
))
{
nomoh
++
;
}
if
(
conference
->
moh_wait
>
0
)
{
if
(
conference
->
moh_wait
>
0
)
{
conference
->
moh_wait
--
;
conference
->
moh_wait
--
;
}
else
{
}
else
{
char
*
moh_sound
=
conference
->
tmp_moh_sound
;
if
(
!
moh_sound
)
{
moh_sound
=
conference
->
moh_sound
;
}
if
(
conference
->
perpetual_sound
&&
!
conference
->
async_fnode
)
{
if
(
conference
->
perpetual_sound
&&
!
conference
->
async_fnode
)
{
moh_status
=
conference_file_play
(
conference
,
conference
->
perpetual_sound
,
CONF_DEFAULT_LEADIN
,
NULL
,
1
);
moh_status
=
conference_file_play
(
conference
,
conference
->
perpetual_sound
,
CONF_DEFAULT_LEADIN
,
NULL
,
1
);
}
else
if
(
conference
->
moh_sound
&&
((
nomoh
==
0
&&
conference
->
count
==
1
)
}
else
if
(
moh_sound
&&
((
nomoh
==
0
&&
conference
->
count
==
1
)
||
conference_utils_test_flag
(
conference
,
CFLAG_WAIT_MOD
))
&&
||
conference_utils_test_flag
(
conference
,
CFLAG_WAIT_MOD
))
&&
!
conference
->
async_fnode
&&
!
conference
->
fnode
)
{
!
conference
->
async_fnode
&&
!
conference
->
fnode
)
{
moh_status
=
conference_file_play
(
conference
,
conference
->
moh_sound
,
CONF_DEFAULT_LEADIN
,
NULL
,
1
);
moh_status
=
conference_file_play
(
conference
,
moh_sound
,
CONF_DEFAULT_LEADIN
,
NULL
,
1
);
}
}
}
}
...
...
src/mod/applications/mod_conference/mod_conference.h
浏览文件 @
4d348587
...
@@ -258,6 +258,7 @@ typedef enum {
...
@@ -258,6 +258,7 @@ typedef enum {
CFLAG_PERSONAL_CANVAS
,
CFLAG_PERSONAL_CANVAS
,
CFLAG_REFRESH_LAYOUT
,
CFLAG_REFRESH_LAYOUT
,
CFLAG_VIDEO_MUTE_EXIT_CANVAS
,
CFLAG_VIDEO_MUTE_EXIT_CANVAS
,
CFLAG_NO_MOH
,
/////////////////////////////////
/////////////////////////////////
CFLAG_MAX
CFLAG_MAX
}
conference_flag_t
;
}
conference_flag_t
;
...
@@ -609,6 +610,7 @@ typedef struct conference_obj {
...
@@ -609,6 +610,7 @@ typedef struct conference_obj {
char
*
alone_sound
;
char
*
alone_sound
;
char
*
perpetual_sound
;
char
*
perpetual_sound
;
char
*
moh_sound
;
char
*
moh_sound
;
char
*
tmp_moh_sound
;
char
*
muted_sound
;
char
*
muted_sound
;
char
*
mute_detect_sound
;
char
*
mute_detect_sound
;
char
*
unmuted_sound
;
char
*
unmuted_sound
;
...
@@ -1191,6 +1193,7 @@ switch_status_t conference_api_sub_dtmf(conference_member_t *member, switch_stre
...
@@ -1191,6 +1193,7 @@ switch_status_t conference_api_sub_dtmf(conference_member_t *member, switch_stre
switch_status_t
conference_api_sub_pause_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_pause_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_play_status
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_play_status
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_moh
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_say
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
const
char
*
text
);
switch_status_t
conference_api_sub_say
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
const
char
*
text
);
switch_status_t
conference_api_sub_dial
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_dial
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_bgdial
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_bgdial
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
...
@@ -1249,7 +1252,7 @@ switch_status_t conference_api_sub_vid_personal(conference_obj_t *conference, sw
...
@@ -1249,7 +1252,7 @@ switch_status_t conference_api_sub_vid_personal(conference_obj_t *conference, sw
switch_status_t
conference_api_dispatch
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
,
const
char
*
cmdline
,
int
argn
);
switch_status_t
conference_api_dispatch
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
,
const
char
*
cmdline
,
int
argn
);
switch_status_t
conference_api_sub_syntax
(
char
**
syntax
);
switch_status_t
conference_api_sub_syntax
(
char
**
syntax
);
switch_status_t
conference_api_main_real
(
const
char
*
cmd
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
switch_status_t
conference_api_main_real
(
const
char
*
cmd
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
switch_status_t
conference_api_set_moh
(
conference_obj_t
*
conference
,
const
char
*
what
);
void
conference_loop_mute_on
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_mute_on
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_mute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_mute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
...
@@ -1273,6 +1276,7 @@ void conference_loop_conference_video_vmute_snap(conference_member_t *member, ca
...
@@ -1273,6 +1276,7 @@ void conference_loop_conference_video_vmute_snap(conference_member_t *member, ca
void
conference_loop_conference_video_vmute_snapoff
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_conference_video_vmute_snapoff
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_vmute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_vmute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_vmute_on
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_vmute_on
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_moh_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_deafmute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_deafmute_toggle
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_hangup
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_hangup
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_transfer
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
void
conference_loop_transfer
(
conference_member_t
*
member
,
caller_control_action_t
*
action
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论