Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
3e2c662a
提交
3e2c662a
authored
8月 04, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean up originator/ee profile so the right one is prevelant in events
上级
77c5000d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
21 行增加
和
15 行删除
+21
-15
switch_channel.c
src/switch_channel.c
+17
-15
switch_ivr_bridge.c
src/switch_ivr_bridge.c
+4
-0
没有找到文件。
src/switch_channel.c
浏览文件 @
3e2c662a
...
...
@@ -110,6 +110,12 @@ typedef enum {
OCF_HANGUP
=
(
1
<<
0
)
}
opaque_channel_flag_t
;
typedef
enum
{
LP_NEITHER
,
LP_ORIGINATOR
,
LP_ORIGINATEE
}
switch_originator_type_t
;
struct
switch_channel
{
char
*
name
;
switch_call_direction_t
direction
;
...
...
@@ -139,6 +145,7 @@ struct switch_channel {
int
event_count
;
int
profile_index
;
opaque_channel_flag_t
opaque_flags
;
switch_originator_type_t
last_profile_type
;
};
...
...
@@ -2156,23 +2163,16 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
switch_caller_profile_event_set_data
(
caller_profile
,
"Caller"
,
event
);
}
if
(
originator_caller_profile
&&
originatee_caller_profile
)
{
/* Index Originator's Profile */
switch_caller_profile_event_set_data
(
originator_caller_profile
,
"Originator"
,
event
);
/* Index Originatee's Profile */
switch_caller_profile_event_set_data
(
originatee_caller_profile
,
"Originatee"
,
event
);
}
else
{
/* Index Originator's Profile */
if
(
originator_caller_profile
)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Other-Type"
,
"originator"
);
switch_caller_profile_event_set_data
(
originator_caller_profile
,
"Other-Leg"
,
event
);
}
else
if
(
originatee_caller_profile
)
{
/* Index Originatee's Profile */
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Other-Type"
,
"originatee"
);
switch_caller_profile_event_set_data
(
originatee_caller_profile
,
"Other-Leg"
,
event
);
}
/* Index Originator/ee's Profile */
if
(
originator_caller_profile
&&
channel
->
last_profile_type
==
LP_ORIGINATOR
)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Other-Type"
,
"originator"
);
switch_caller_profile_event_set_data
(
originator_caller_profile
,
"Other-Leg"
,
event
);
}
else
if
(
originatee_caller_profile
&&
channel
->
last_profile_type
==
LP_ORIGINATEE
)
{
/* Index Originatee's Profile */
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Other-Type"
,
"originatee"
);
switch_caller_profile_event_set_data
(
originatee_caller_profile
,
"Other-Leg"
,
event
);
}
switch_mutex_unlock
(
channel
->
profile_mutex
);
}
...
...
@@ -2342,6 +2342,7 @@ SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel
if
(
channel
->
caller_profile
)
{
caller_profile
->
next
=
channel
->
caller_profile
->
originator_caller_profile
;
channel
->
caller_profile
->
originator_caller_profile
=
caller_profile
;
channel
->
last_profile_type
=
LP_ORIGINATOR
;
}
switch_assert
(
channel
->
caller_profile
->
originator_caller_profile
->
next
!=
channel
->
caller_profile
->
originator_caller_profile
);
switch_mutex_unlock
(
channel
->
profile_mutex
);
...
...
@@ -2402,6 +2403,7 @@ SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel
if
(
channel
->
caller_profile
)
{
caller_profile
->
next
=
channel
->
caller_profile
->
originatee_caller_profile
;
channel
->
caller_profile
->
originatee_caller_profile
=
caller_profile
;
channel
->
last_profile_type
=
LP_ORIGINATEE
;
}
switch_assert
(
channel
->
caller_profile
->
originatee_caller_profile
->
next
!=
channel
->
caller_profile
->
originatee_caller_profile
);
switch_mutex_unlock
(
channel
->
profile_mutex
);
...
...
src/switch_ivr_bridge.c
浏览文件 @
3e2c662a
...
...
@@ -997,6 +997,8 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
if
(
switch_channel_test_flag
(
channel
,
CF_BRIDGE_ORIGINATOR
))
{
switch_channel_clear_flag_recursive
(
channel
,
CF_BRIDGE_ORIGINATOR
);
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_CHANNEL_UNBRIDGE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Bridge-A-Unique-ID"
,
switch_core_session_get_uuid
(
session
));
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Bridge-B-Unique-ID"
,
uuid
);
switch_channel_event_set_data
(
channel
,
event
);
switch_event_fire
(
&
event
);
}
...
...
@@ -1310,6 +1312,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
switch_channel_set_variable
(
peer_channel
,
"call_uuid"
,
switch_core_session_get_uuid
(
peer_session
));
if
(
br
&&
switch_event_create
(
&
event
,
SWITCH_EVENT_CHANNEL_UNBRIDGE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Bridge-A-Unique-ID"
,
switch_core_session_get_uuid
(
session
));
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Bridge-B-Unique-ID"
,
switch_core_session_get_uuid
(
peer_session
));
switch_channel_event_set_data
(
caller_channel
,
event
);
switch_event_fire
(
&
event
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论