Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b2f0f9b8
提交
b2f0f9b8
authored
4月 02, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix some cid stuff in fifo
上级
4432a0a0
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
39 行增加
和
16 行删除
+39
-16
mod_fifo.c
src/mod/applications/mod_fifo/mod_fifo.c
+39
-16
没有找到文件。
src/mod/applications/mod_fifo/mod_fifo.c
浏览文件 @
b2f0f9b8
...
@@ -2906,7 +2906,7 @@ SWITCH_STANDARD_APP(fifo_function)
...
@@ -2906,7 +2906,7 @@ SWITCH_STANDARD_APP(fifo_function)
if
(
node
&&
other_session
)
{
if
(
node
&&
other_session
)
{
switch_channel_t
*
other_channel
=
switch_core_session_get_channel
(
other_session
);
switch_channel_t
*
other_channel
=
switch_core_session_get_channel
(
other_session
);
switch_caller_profile_t
*
cloned_profile
,
*
a_cp
,
*
b
_cp
;
switch_caller_profile_t
*
originator_cp
,
*
originatee
_cp
;
const
char
*
o_announce
=
NULL
;
const
char
*
o_announce
=
NULL
;
const
char
*
record_template
=
switch_channel_get_variable
(
channel
,
"fifo_record_template"
);
const
char
*
record_template
=
switch_channel_get_variable
(
channel
,
"fifo_record_template"
);
char
*
expanded
=
NULL
;
char
*
expanded
=
NULL
;
...
@@ -2981,26 +2981,41 @@ SWITCH_STANDARD_APP(fifo_function)
...
@@ -2981,26 +2981,41 @@ SWITCH_STANDARD_APP(fifo_function)
switch_channel_answer
(
channel
);
switch_channel_answer
(
channel
);
a_cp
=
switch_channel_get_caller_profile
(
channel
);
originator_cp
=
switch_channel_get_caller_profile
(
channel
);
b_cp
=
switch_channel_get_caller_profile
(
other_channel
);
originatee_cp
=
switch_channel_get_caller_profile
(
other_channel
);
cloned_profile
=
switch_caller_profile_clone
(
other_session
,
a_cp
);
if
(
switch_channel_inbound_display
(
other_channel
))
{
switch_assert
(
cloned_profile
);
const
char
*
tname
=
originatee_cp
->
caller_id_name
;
switch_channel_set_originator_caller_profile
(
other_channel
,
cloned_profile
);
const
char
*
tnum
=
originatee_cp
->
caller_id_number
;
#ifdef DEEP_DEBUG_CID
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"SWAP [%s][%s] [%s][%s]
\n
"
,
originatee_cp
->
caller_id_name
,
originatee_cp
->
caller_id_number
,
originatee_cp
->
callee_id_name
,
originatee_cp
->
callee_id_number
);
#endif
originatee_cp
->
caller_id_name
=
originatee_cp
->
callee_id_name
;
originatee_cp
->
caller_id_number
=
originatee_cp
->
callee_id_number
;
originatee_cp
->
callee_id_name
=
tname
;
originatee_cp
->
callee_id_number
=
tnum
;
}
a_cp
->
callee_id_name
=
switch_core_strdup
(
a_cp
->
pool
,
b_cp
->
caller_id_name
);
a_cp
->
callee_id_number
=
switch_core_strdup
(
a_cp
->
pool
,
b_cp
->
caller_id_number
);
switch_channel_step_caller_profile
(
channel
);
switch_channel_step_caller_profile
(
other_channel
);
cloned_profile
=
switch_caller_profile_clone
(
session
,
b_cp
);
originator_cp
=
switch_channel_get_caller_profile
(
channel
);
switch_assert
(
cloned_profile
);
originatee_cp
=
switch_channel_get_caller_profile
(
other_channel
);
switch_assert
(
cloned_profile
->
next
==
NULL
);
switch_channel_set_originatee_caller_profile
(
channel
,
cloned_profile
);
switch_channel_set_originator_caller_profile
(
other_channel
,
switch_caller_profile_clone
(
other_session
,
originator_cp
));
switch_channel_set_originatee_caller_profile
(
channel
,
switch_caller_profile_clone
(
session
,
originatee_cp
));
originator_cp
->
callee_id_name
=
switch_core_strdup
(
originator_cp
->
pool
,
originatee_cp
->
callee_id_name
);
originator_cp
->
callee_id_number
=
switch_core_strdup
(
originator_cp
->
pool
,
originatee_cp
->
callee_id_number
);
originatee_cp
->
caller_id_name
=
switch_core_strdup
(
originatee_cp
->
pool
,
originator_cp
->
caller_id_name
);
originatee_cp
->
caller_id_number
=
switch_core_strdup
(
originatee_cp
->
pool
,
originator_cp
->
caller_id_number
);
b_cp
->
callee_id_name
=
switch_core_strdup
(
b_cp
->
pool
,
a_cp
->
caller_id_name
);
b_cp
->
callee_id_number
=
switch_core_strdup
(
b_cp
->
pool
,
a_cp
->
caller_id_number
);
ts
=
switch_micro_time_now
();
ts
=
switch_micro_time_now
();
...
@@ -3028,8 +3043,10 @@ SWITCH_STANDARD_APP(fifo_function)
...
@@ -3028,8 +3043,10 @@ SWITCH_STANDARD_APP(fifo_function)
switch_core_media_bug_resume
(
session
);
switch_core_media_bug_resume
(
session
);
switch_core_media_bug_resume
(
other_session
);
switch_core_media_bug_resume
(
other_session
);
switch_process_import
(
session
,
other_channel
,
"fifo_caller_consumer_import"
,
switch_channel_get_variable
(
channel
,
"fifo_import_prefix"
));
switch_process_import
(
session
,
other_channel
,
"fifo_caller_consumer_import"
,
switch_channel_get_variable
(
channel
,
"fifo_import_prefix"
));
switch_process_import
(
other_session
,
channel
,
"fifo_consumer_caller_import"
,
switch_channel_get_variable
(
other_channel
,
"fifo_import_prefix"
));
switch_process_import
(
other_session
,
channel
,
"fifo_consumer_caller_import"
,
switch_channel_get_variable
(
other_channel
,
"fifo_import_prefix"
));
if
(
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
FIFO_EVENT
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
FIFO_EVENT
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_channel_event_set_data
(
channel
,
event
);
switch_channel_event_set_data
(
channel
,
event
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"FIFO-Name"
,
argv
[
0
]);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"FIFO-Name"
,
argv
[
0
]);
...
@@ -3080,6 +3097,12 @@ SWITCH_STANDARD_APP(fifo_function)
...
@@ -3080,6 +3097,12 @@ SWITCH_STANDARD_APP(fifo_function)
if
(
!
switch_channel_test_flag
(
other_channel
,
CF_TRANSFER
)
||
!
switch_channel_up
(
other_channel
))
{
if
(
!
switch_channel_test_flag
(
other_channel
,
CF_TRANSFER
)
||
!
switch_channel_up
(
other_channel
))
{
switch_channel_set_variable
(
other_channel
,
"fifo_initiated_bridge"
,
"true"
);
switch_channel_set_variable
(
other_channel
,
"fifo_initiated_bridge"
,
"true"
);
switch_channel_set_variable
(
other_channel
,
"fifo_bridge_role"
,
"caller"
);
}
if
(
!
switch_channel_test_flag
(
channel
,
CF_TRANSFER
)
||
!
switch_channel_up
(
channel
))
{
switch_channel_set_variable
(
channel
,
"fifo_initiated_bridge"
,
"true"
);
switch_channel_set_variable
(
channel
,
"fifo_bridge_role"
,
"consumer"
);
}
}
if
(
outbound_id
)
{
if
(
outbound_id
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论