Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
96ae6ef4
提交
96ae6ef4
authored
6月 04, 2018
作者:
lazedo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10704 [core] add event-uuid-name
this allows for external call control to provide a app name
上级
ae7e4d2e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
5 行删除
+12
-5
switch_core_session.c
src/switch_core_session.c
+8
-5
switch_ivr.c
src/switch_ivr.c
+4
-0
没有找到文件。
src/switch_core_session.c
浏览文件 @
96ae6ef4
...
@@ -2756,7 +2756,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
...
@@ -2756,7 +2756,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
const
char
*
var
;
const
char
*
var
;
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
char
*
expanded
=
NULL
;
char
*
expanded
=
NULL
;
const
char
*
app
,
*
app_uuid_var
;
const
char
*
app
,
*
app_uuid_var
,
*
app_uuid_name
;
switch_core_session_message_t
msg
=
{
0
};
switch_core_session_message_t
msg
=
{
0
};
char
delim
=
','
;
char
delim
=
','
;
int
scope
=
0
;
int
scope
=
0
;
...
@@ -2765,10 +2765,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
...
@@ -2765,10 +2765,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
if
((
app_uuid_var
=
switch_channel_get_variable
(
channel
,
"app_uuid"
)))
{
if
((
app_uuid_var
=
switch_channel_get_variable
(
channel
,
"app_uuid"
)))
{
app_uuid
=
(
char
*
)
app_uuid_var
;
app_uuid
=
(
char
*
)
app_uuid_var
;
switch_channel_set_variable
(
channel
,
"app_uuid"
,
NULL
);
}
else
{
}
else
{
switch_uuid_str
(
uuid_str
,
sizeof
(
uuid_str
));
switch_uuid_str
(
uuid_str
,
sizeof
(
uuid_str
));
}
}
if
((
app_uuid_name
=
switch_channel_get_variable
(
channel
,
"app_uuid_name"
)))
{
switch_channel_set_variable
(
channel
,
"app_uuid_name"
,
NULL
);
}
switch_assert
(
application_interface
);
switch_assert
(
application_interface
);
app
=
application_interface
->
interface_name
;
app
=
application_interface
->
interface_name
;
...
@@ -2853,6 +2858,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
...
@@ -2853,6 +2858,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application"
,
application_interface
->
interface_name
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application"
,
application_interface
->
interface_name
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-Data"
,
expanded
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-Data"
,
expanded
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-UUID"
,
app_uuid
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-UUID"
,
app_uuid
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-UUID-Name"
,
app_uuid_name
);
switch_event_fire
(
&
event
);
switch_event_fire
(
&
event
);
}
}
...
@@ -2877,13 +2883,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
...
@@ -2877,13 +2883,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-Data"
,
expanded
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-Data"
,
expanded
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-Response"
,
resp
?
resp
:
"_none_"
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-Response"
,
resp
?
resp
:
"_none_"
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-UUID"
,
app_uuid
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-UUID"
,
app_uuid
);
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Application-UUID-Name"
,
app_uuid_name
);
switch_event_fire
(
&
event
);
switch_event_fire
(
&
event
);
}
}
if
(
app_uuid
!=
uuid_str
)
{
switch_channel_set_variable
(
channel
,
"app_uuid"
,
NULL
);
};
msg
.
message_id
=
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC_COMPLETE
;
msg
.
message_id
=
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC_COMPLETE
;
switch_core_session_receive_message
(
session
,
&
msg
);
switch_core_session_receive_message
(
session
,
&
msg
);
...
...
src/switch_ivr.c
浏览文件 @
96ae6ef4
...
@@ -550,6 +550,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
...
@@ -550,6 +550,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
if
(
cmd_hash
==
CMD_EXECUTE
)
{
if
(
cmd_hash
==
CMD_EXECUTE
)
{
char
*
app_name
=
switch_event_get_header
(
event
,
"execute-app-name"
);
char
*
app_name
=
switch_event_get_header
(
event
,
"execute-app-name"
);
char
*
event_uuid
=
switch_event_get_header
(
event
,
"event-uuid"
);
char
*
event_uuid
=
switch_event_get_header
(
event
,
"event-uuid"
);
char
*
event_uuid_name
=
switch_event_get_header
(
event
,
"event-uuid-name"
);
char
*
app_arg
=
switch_event_get_header
(
event
,
"execute-app-arg"
);
char
*
app_arg
=
switch_event_get_header
(
event
,
"execute-app-arg"
);
char
*
content_type
=
switch_event_get_header
(
event
,
"content-type"
);
char
*
content_type
=
switch_event_get_header
(
event
,
"content-type"
);
char
*
loop_h
=
switch_event_get_header
(
event
,
"loops"
);
char
*
loop_h
=
switch_event_get_header
(
event
,
"loops"
);
...
@@ -628,6 +629,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
...
@@ -628,6 +629,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
if
(
event_uuid
)
{
if
(
event_uuid
)
{
switch_channel_set_variable
(
channel
,
"app_uuid"
,
event_uuid
);
switch_channel_set_variable
(
channel
,
"app_uuid"
,
event_uuid
);
}
}
if
(
event_uuid_name
)
{
switch_channel_set_variable
(
channel
,
"app_uuid_name"
,
event_uuid_name
);
}
switch_channel_set_variable_printf
(
channel
,
"current_loop"
,
"%d"
,
x
+
1
);
switch_channel_set_variable_printf
(
channel
,
"current_loop"
,
"%d"
,
x
+
1
);
switch_channel_set_variable_printf
(
channel
,
"total_loops"
,
"%d"
,
loops
);
switch_channel_set_variable_printf
(
channel
,
"total_loops"
,
"%d"
,
loops
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论