Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
f993cac1
提交
f993cac1
authored
12月 25, 2011
作者:
Marc Olivier Chouinard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mod_voicemail_ivr: Initial support for settings parameters
上级
08e6e8bc
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
2 行删除
+22
-2
config.c
src/mod/applications/mod_voicemail_ivr/config.c
+20
-2
config.h
src/mod/applications/mod_voicemail_ivr/config.h
+2
-0
没有找到文件。
src/mod/applications/mod_voicemail_ivr/config.c
浏览文件 @
f993cac1
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
const
char
*
global_cf
=
"voicemail_ivr.conf"
;
const
char
*
global_cf
=
"voicemail_ivr.conf"
;
void
populate_profile_menu_event
(
vmivr_profile_t
*
profile
,
vmivr_menu_profile_t
*
menu
)
{
void
populate_profile_menu_event
(
vmivr_profile_t
*
profile
,
vmivr_menu_profile_t
*
menu
)
{
switch_xml_t
cfg
,
xml
,
x_profiles
,
x_profile
,
x_keys
,
x_phrases
,
x_menus
,
x_menu
;
switch_xml_t
cfg
,
xml
,
x_profiles
,
x_profile
,
x_keys
,
x_phrases
,
x_menus
,
x_menu
,
x_settings
;
free_profile_menu_event
(
menu
);
free_profile_menu_event
(
menu
);
...
@@ -48,6 +48,12 @@ void populate_profile_menu_event(vmivr_profile_t *profile, vmivr_menu_profile_t
...
@@ -48,6 +48,12 @@ void populate_profile_menu_event(vmivr_profile_t *profile, vmivr_menu_profile_t
goto
end
;
goto
end
;
}
}
if
(
profile
->
event_settings
)
{
switch_event_create
(
&
menu
->
event_settings
,
SWITCH_EVENT_REQUEST_PARAMS
);
switch_event_merge
(
menu
->
event_settings
,
profile
->
event_settings
);
}
if
((
x_profile
=
switch_xml_find_child
(
x_profiles
,
"profile"
,
"name"
,
profile
->
name
)))
{
if
((
x_profile
=
switch_xml_find_child
(
x_profiles
,
"profile"
,
"name"
,
profile
->
name
)))
{
if
((
x_menus
=
switch_xml_child
(
x_profile
,
"menus"
)))
{
if
((
x_menus
=
switch_xml_child
(
x_profile
,
"menus"
)))
{
if
((
x_menu
=
switch_xml_find_child
(
x_menus
,
"menu"
,
"name"
,
menu
->
name
)))
{
if
((
x_menu
=
switch_xml_find_child
(
x_menus
,
"menu"
,
"name"
,
menu
->
name
)))
{
...
@@ -59,6 +65,10 @@ void populate_profile_menu_event(vmivr_profile_t *profile, vmivr_menu_profile_t
...
@@ -59,6 +65,10 @@ void populate_profile_menu_event(vmivr_profile_t *profile, vmivr_menu_profile_t
if
((
x_phrases
=
switch_xml_child
(
x_menu
,
"phrases"
)))
{
if
((
x_phrases
=
switch_xml_child
(
x_menu
,
"phrases"
)))
{
switch_event_import_xml
(
switch_xml_child
(
x_phrases
,
"phrase"
),
"name"
,
"value"
,
&
menu
->
event_phrases
);
switch_event_import_xml
(
switch_xml_child
(
x_phrases
,
"phrase"
),
"name"
,
"value"
,
&
menu
->
event_phrases
);
}
}
if
((
x_settings
=
switch_xml_child
(
x_profile
,
"settings"
)))
{
switch_event_import_xml
(
switch_xml_child
(
x_settings
,
"param"
),
"name"
,
"value"
,
&
menu
->
event_settings
);
}
}
}
}
}
}
}
...
@@ -83,12 +93,16 @@ void free_profile_menu_event(vmivr_menu_profile_t *menu) {
...
@@ -83,12 +93,16 @@ void free_profile_menu_event(vmivr_menu_profile_t *menu) {
if
(
menu
->
event_phrases
)
{
if
(
menu
->
event_phrases
)
{
switch_event_destroy
(
&
menu
->
event_phrases
);
switch_event_destroy
(
&
menu
->
event_phrases
);
}
}
if
(
menu
->
event_settings
)
{
switch_event_destroy
(
&
menu
->
event_settings
);
}
}
}
vmivr_profile_t
*
get_profile
(
switch_core_session_t
*
session
,
const
char
*
profile_name
)
vmivr_profile_t
*
get_profile
(
switch_core_session_t
*
session
,
const
char
*
profile_name
)
{
{
vmivr_profile_t
*
profile
=
NULL
;
vmivr_profile_t
*
profile
=
NULL
;
switch_xml_t
cfg
,
xml
,
x_profiles
,
x_profile
,
x_apis
,
param
;
switch_xml_t
cfg
,
xml
,
x_profiles
,
x_profile
,
x_apis
,
x_settings
,
param
;
if
(
!
(
xml
=
switch_xml_open_cfg
(
global_cf
,
&
cfg
,
NULL
)))
{
if
(
!
(
xml
=
switch_xml_open_cfg
(
global_cf
,
&
cfg
,
NULL
)))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Open of %s failed
\n
"
,
global_cf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Open of %s failed
\n
"
,
global_cf
);
...
@@ -118,6 +132,10 @@ vmivr_profile_t *get_profile(switch_core_session_t *session, const char *profile
...
@@ -118,6 +132,10 @@ vmivr_profile_t *get_profile(switch_core_session_t *session, const char *profile
profile
->
menu_check_main
=
"std_main_menu"
;
profile
->
menu_check_main
=
"std_main_menu"
;
profile
->
menu_check_terminate
=
"std_purge"
;
profile
->
menu_check_terminate
=
"std_purge"
;
if
((
x_settings
=
switch_xml_child
(
x_profile
,
"settings"
)))
{
switch_event_import_xml
(
switch_xml_child
(
x_settings
,
"param"
),
"name"
,
"value"
,
&
profile
->
event_settings
);
}
if
((
x_apis
=
switch_xml_child
(
x_profile
,
"apis"
)))
{
if
((
x_apis
=
switch_xml_child
(
x_profile
,
"apis"
)))
{
int
total_options
=
0
;
int
total_options
=
0
;
int
total_invalid_options
=
0
;
int
total_invalid_options
=
0
;
...
...
src/mod/applications/mod_voicemail_ivr/config.h
浏览文件 @
f993cac1
...
@@ -71,6 +71,7 @@ struct vmivr_profile {
...
@@ -71,6 +71,7 @@ struct vmivr_profile {
const
char
*
api_pref_recname_set
;
const
char
*
api_pref_recname_set
;
const
char
*
api_pref_password_set
;
const
char
*
api_pref_password_set
;
switch_event_t
*
event_settings
;
};
};
typedef
struct
vmivr_profile
vmivr_profile_t
;
typedef
struct
vmivr_profile
vmivr_profile_t
;
...
@@ -80,6 +81,7 @@ struct vmivr_menu_profile {
...
@@ -80,6 +81,7 @@ struct vmivr_menu_profile {
switch_event_t
*
event_keys_action
;
switch_event_t
*
event_keys_action
;
switch_event_t
*
event_keys_dtmf
;
switch_event_t
*
event_keys_dtmf
;
switch_event_t
*
event_keys_varname
;
switch_event_t
*
event_keys_varname
;
switch_event_t
*
event_settings
;
switch_event_t
*
event_phrases
;
switch_event_t
*
event_phrases
;
};
};
typedef
struct
vmivr_menu_profile
vmivr_menu_profile_t
;
typedef
struct
vmivr_menu_profile
vmivr_menu_profile_t
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论