Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b4a64d48
提交
b4a64d48
authored
9月 02, 2018
作者:
Anthony Minessale
提交者:
Mike Jerris
9月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11380: [core] add new internal function
上级
48aebd73
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
50 行增加
和
3 行删除
+50
-3
switch_ivr.h
src/include/switch_ivr.h
+8
-0
switch_types.h
src/include/switch_types.h
+1
-0
switch_ivr_bridge.c
src/switch_ivr_bridge.c
+41
-3
没有找到文件。
src/include/switch_ivr.h
浏览文件 @
b4a64d48
...
...
@@ -542,6 +542,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(_In_ switch_cor
switch_input_callback_function_t
dtmf_callback
,
void
*
session_data
,
void
*
peer_session_data
);
/*!
\brief Bridge leaving b-leg in the control of another thread. Call from b-leg first then call switch_ivr_multi_threaded_bridge on a-leg and b-leg.
\param session b-leg session
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_bridge_bleg
(
switch_core_session_t
*
session
,
switch_core_session_t
*
peer_session
,
uint32_t
max_wait_ms
);
/*!
\brief Bridge Signalling from one session to another
\param session one session
...
...
src/include/switch_types.h
浏览文件 @
b4a64d48
...
...
@@ -1569,6 +1569,7 @@ typedef enum {
CF_AWAITING_STREAM_CHANGE
,
CF_PROCESSING_STREAM_CHANGE
,
CF_STREAM_CHANGED
,
CF_ARRANGED_BRIDGE
,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX
...
...
src/switch_ivr_bridge.c
浏览文件 @
b4a64d48
...
...
@@ -1076,6 +1076,38 @@ static const switch_state_handler_table_t audio_bridge_peer_state_handlers = {
/*.on_consume_media */
audio_bridge_on_consume_media
,
};
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_bridge_bleg
(
switch_core_session_t
*
session
,
switch_core_session_t
*
peer_session
,
uint32_t
max_wait_ms
)
{
switch_channel_t
*
channel
;
switch_channel_t
*
peer_channel
=
NULL
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_assert
(
session
);
channel
=
switch_core_session_get_channel
(
session
);
switch_channel_set_flag
(
channel
,
CF_ARRANGED_BRIDGE
);
if
(
peer_session
)
{
peer_channel
=
switch_core_session_get_channel
(
peer_session
);
}
status
=
switch_channel_wait_for_flag
(
channel
,
CF_ARRANGED_BRIDGE
,
SWITCH_FALSE
,
max_wait_ms
,
peer_channel
);
if
(
status
==
SWITCH_STATUS_FALSE
)
return
status
;
if
(
switch_channel_test_flag
(
channel
,
CF_ARRANGED_BRIDGE
))
{
switch_channel_clear_flag
(
channel
,
CF_ARRANGED_BRIDGE
);
return
SWITCH_STATUS_FALSE
;
}
else
{
audio_bridge_on_exchange_media
(
session
);
}
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
uuid_bridge_on_reset
(
switch_core_session_t
*
session
);
static
switch_status_t
uuid_bridge_on_hibernate
(
switch_core_session_t
*
session
);
static
switch_status_t
uuid_bridge_on_soft_execute
(
switch_core_session_t
*
session
);
...
...
@@ -1636,7 +1668,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
goto
done
;
}
if
(
!
switch_channel_test_flag
(
peer_channel
,
CF_ARRANGED_BRIDGE
))
{
switch_channel_set_state
(
peer_channel
,
CS_CONSUME_MEDIA
);
}
switch_channel_set_variable
(
peer_channel
,
"call_uuid"
,
switch_core_session_get_uuid
(
session
));
...
...
@@ -1741,8 +1775,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
}
switch_channel_set_private
(
peer_channel
,
"_bridge_"
,
b_leg
);
switch_channel_set_state
(
peer_channel
,
CS_EXCHANGE_MEDIA
);
if
(
switch_channel_test_flag
(
peer_channel
,
CF_ARRANGED_BRIDGE
))
{
switch_channel_clear_flag
(
peer_channel
,
CF_ARRANGED_BRIDGE
);
}
else
{
switch_channel_set_state
(
peer_channel
,
CS_EXCHANGE_MEDIA
);
}
audio_bridge_thread
(
NULL
,
(
void
*
)
a_leg
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论