Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c8733f2b
提交
c8733f2b
authored
11月 12, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@3320
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
8f8396d7
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
69 行删除
+39
-69
switch_ivr.h
src/include/switch_ivr.h
+14
-19
switch_ivr.c
src/switch_ivr.c
+25
-50
没有找到文件。
src/include/switch_ivr.h
浏览文件 @
c8733f2b
...
@@ -75,8 +75,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session);
...
@@ -75,8 +75,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session);
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_callback
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_callback
(
switch_core_session_t
*
session
,
switch_input_callback_function_t
dtmf_callback
,
switch_input_callback_function_t
dtmf_callback
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
,
u
int32_
t
buflen
,
u
nsigned
in
t
timeout
);
u
int32_
t
timeout
);
/*!
/*!
\brief Wait for specified number of DTMF digits, untile terminator is received or until the channel hangs up.
\brief Wait for specified number of DTMF digits, untile terminator is received or until the channel hangs up.
...
@@ -91,11 +91,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
...
@@ -91,11 +91,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
*/
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_count
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_count
(
switch_core_session_t
*
session
,
char
*
buf
,
char
*
buf
,
u
nsigned
in
t
buflen
,
u
int32_
t
buflen
,
u
nsigned
in
t
maxdigits
,
u
int32_
t
maxdigits
,
const
char
*
terminators
,
const
char
*
terminators
,
char
*
terminator
,
char
*
terminator
,
u
nsigned
in
t
timeout
);
u
int32_
t
timeout
);
/*!
/*!
\brief Engage background Speech detection on a session
\brief Engage background Speech detection on a session
...
@@ -187,7 +187,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
...
@@ -187,7 +187,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
char
*
timer_name
,
char
*
timer_name
,
switch_input_callback_function_t
dtmf_callback
,
switch_input_callback_function_t
dtmf_callback
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
);
u
int32_
t
buflen
);
...
@@ -207,7 +207,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
...
@@ -207,7 +207,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
char
*
file
,
char
*
file
,
switch_input_callback_function_t
dtmf_callback
,
switch_input_callback_function_t
dtmf_callback
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
);
u
int32_
t
buflen
);
/*!
/*!
\brief Function to evaluate an expression against a string
\brief Function to evaluate an expression against a string
...
@@ -234,15 +234,15 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expressio
...
@@ -234,15 +234,15 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expressio
\note to test for digit capture failure look for \\0 in the first position of the buffer
\note to test for digit capture failure look for \\0 in the first position of the buffer
*/
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_play_and_get_digits
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_play_and_get_digits
(
switch_core_session_t
*
session
,
u
nsigned
in
t
min_digits
,
u
int32_
t
min_digits
,
u
nsigned
in
t
max_digits
,
u
int32_
t
max_digits
,
u
nsigned
in
t
max_tries
,
u
int32_
t
max_tries
,
u
nsigned
in
t
timeout
,
u
int32_
t
timeout
,
char
*
valid_terminators
,
char
*
valid_terminators
,
char
*
audio_file
,
char
*
audio_file
,
char
*
bad_input_audio_file
,
char
*
bad_input_audio_file
,
void
*
digit_buffer
,
void
*
digit_buffer
,
u
nsigned
in
t
digit_buffer_length
,
u
int32_
t
digit_buffer_length
,
char
*
digits_regex
);
char
*
digits_regex
);
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_speak_text_handle
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_speak_text_handle
(
switch_core_session_t
*
session
,
...
@@ -252,7 +252,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
...
@@ -252,7 +252,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
switch_input_callback_function_t
dtmf_callback
,
switch_input_callback_function_t
dtmf_callback
,
char
*
text
,
char
*
text
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
);
u
int32_
t
buflen
);
/*!
/*!
\brief Speak given text with given tts engine
\brief Speak given text with given tts engine
...
@@ -275,7 +275,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
...
@@ -275,7 +275,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
switch_input_callback_function_t
dtmf_callback
,
switch_input_callback_function_t
dtmf_callback
,
char
*
text
,
char
*
text
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
);
u
int32_
t
buflen
);
/*!
/*!
\brief Make an outgoing call
\brief Make an outgoing call
...
@@ -457,7 +457,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
...
@@ -457,7 +457,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
int
timeout
,
int
timeout
,
int
max_failures
,
int
max_failures
,
int
inlen
,
int
inlen
,
unsigned
int
flags
,
switch_memory_pool_t
*
pool
);
switch_memory_pool_t
*
pool
);
/*!
/*!
...
@@ -501,10 +500,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
...
@@ -501,10 +500,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
*/
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_menu_free_stack
(
switch_ivr_menu_t
*
stack
);
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_menu_free_stack
(
switch_ivr_menu_t
*
stack
);
SWITCH_DECLARE
(
int
)
switch_ivr_menu_set_flag
(
switch_ivr_menu_t
*
menu
,
unsigned
int
flags
);
SWITCH_DECLARE
(
int
)
switch_ivr_menu_clear_flag
(
switch_ivr_menu_t
*
menu
,
unsigned
int
flags
);
SWITCH_DECLARE
(
int
)
switch_ivr_menu_test_flag
(
switch_ivr_menu_t
*
menu
,
unsigned
int
flags
);
/** @} */
/** @} */
SWITCH_END_EXTERN_C
SWITCH_END_EXTERN_C
...
...
src/switch_ivr.c
浏览文件 @
c8733f2b
...
@@ -176,13 +176,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session)
...
@@ -176,13 +176,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session)
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_callback
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_callback
(
switch_core_session_t
*
session
,
switch_input_callback_function_t
input_callback
,
switch_input_callback_function_t
input_callback
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
,
u
int32_
t
buflen
,
u
nsigned
in
t
timeout
)
u
int32_
t
timeout
)
{
{
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_time_t
started
=
0
;
switch_time_t
started
=
0
;
u
nsigned
in
t
elapsed
;
u
int32_
t
elapsed
;
channel
=
switch_core_session_get_channel
(
session
);
channel
=
switch_core_session_get_channel
(
session
);
assert
(
channel
!=
NULL
);
assert
(
channel
!=
NULL
);
...
@@ -201,7 +201,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
...
@@ -201,7 +201,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
char
dtmf
[
128
];
char
dtmf
[
128
];
if
(
timeout
)
{
if
(
timeout
)
{
elapsed
=
(
u
nsigned
in
t
)((
switch_time_now
()
-
started
)
/
1000
);
elapsed
=
(
u
int32_
t
)((
switch_time_now
()
-
started
)
/
1000
);
if
(
elapsed
>=
timeout
)
{
if
(
elapsed
>=
timeout
)
{
break
;
break
;
}
}
...
@@ -243,17 +243,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
...
@@ -243,17 +243,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_count
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_collect_digits_count
(
switch_core_session_t
*
session
,
char
*
buf
,
char
*
buf
,
u
nsigned
in
t
buflen
,
u
int32_
t
buflen
,
u
nsigned
in
t
maxdigits
,
u
int32_
t
maxdigits
,
const
char
*
terminators
,
const
char
*
terminators
,
char
*
terminator
,
char
*
terminator
,
u
nsigned
in
t
timeout
)
u
int32_
t
timeout
)
{
{
u
nsigned
int
i
=
0
,
x
=
(
unsigned
in
t
)
strlen
(
buf
);
u
int32_t
i
=
0
,
x
=
(
uint32_
t
)
strlen
(
buf
);
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_time_t
started
=
0
;
switch_time_t
started
=
0
;
u
nsigned
in
t
elapsed
;
u
int32_
t
elapsed
;
channel
=
switch_core_session_get_channel
(
session
);
channel
=
switch_core_session_get_channel
(
session
);
assert
(
channel
!=
NULL
);
assert
(
channel
!=
NULL
);
...
@@ -278,7 +278,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
...
@@ -278,7 +278,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
switch_event_t
*
event
;
switch_event_t
*
event
;
if
(
timeout
)
{
if
(
timeout
)
{
elapsed
=
(
u
nsigned
in
t
)((
switch_time_now
()
-
started
)
/
1000
);
elapsed
=
(
u
int32_
t
)((
switch_time_now
()
-
started
)
/
1000
);
if
(
elapsed
>=
timeout
)
{
if
(
elapsed
>=
timeout
)
{
break
;
break
;
}
}
...
@@ -292,7 +292,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
...
@@ -292,7 +292,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
if
(
switch_channel_has_dtmf
(
channel
))
{
if
(
switch_channel_has_dtmf
(
channel
))
{
char
dtmf
[
128
];
char
dtmf
[
128
];
switch_channel_dequeue_dtmf
(
channel
,
dtmf
,
sizeof
(
dtmf
));
switch_channel_dequeue_dtmf
(
channel
,
dtmf
,
sizeof
(
dtmf
));
for
(
i
=
0
;
i
<
(
u
nsigned
in
t
)
strlen
(
dtmf
);
i
++
)
{
for
(
i
=
0
;
i
<
(
u
int32_
t
)
strlen
(
dtmf
);
i
++
)
{
if
(
strchr
(
terminators
,
dtmf
[
i
]))
{
if
(
strchr
(
terminators
,
dtmf
[
i
]))
{
*
terminator
=
dtmf
[
i
];
*
terminator
=
dtmf
[
i
];
...
@@ -327,7 +327,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
...
@@ -327,7 +327,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
char
*
file
,
char
*
file
,
switch_input_callback_function_t
input_callback
,
switch_input_callback_function_t
input_callback
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
)
u
int32_
t
buflen
)
{
{
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
char
dtmf
[
128
];
char
dtmf
[
128
];
...
@@ -911,7 +911,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
...
@@ -911,7 +911,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
char
*
timer_name
,
char
*
timer_name
,
switch_input_callback_function_t
input_callback
,
switch_input_callback_function_t
input_callback
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
)
u
int32_
t
buflen
)
{
{
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
int16_t
abuf
[
FILE_STARTSAMPLES
];
int16_t
abuf
[
FILE_STARTSAMPLES
];
...
@@ -1298,15 +1298,15 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expressio
...
@@ -1298,15 +1298,15 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expressio
}
}
SWITCH_DECLARE
(
switch_status_t
)
switch_play_and_get_digits
(
switch_core_session_t
*
session
,
SWITCH_DECLARE
(
switch_status_t
)
switch_play_and_get_digits
(
switch_core_session_t
*
session
,
u
nsigned
in
t
min_digits
,
u
int32_
t
min_digits
,
u
nsigned
in
t
max_digits
,
u
int32_
t
max_digits
,
u
nsigned
in
t
max_tries
,
u
int32_
t
max_tries
,
u
nsigned
in
t
timeout
,
u
int32_
t
timeout
,
char
*
valid_terminators
,
char
*
valid_terminators
,
char
*
prompt_audio_file
,
char
*
prompt_audio_file
,
char
*
bad_input_audio_file
,
char
*
bad_input_audio_file
,
void
*
digit_buffer
,
void
*
digit_buffer
,
u
nsigned
in
t
digit_buffer_length
,
u
int32_
t
digit_buffer_length
,
char
*
digits_regex
)
char
*
digits_regex
)
{
{
...
@@ -1423,7 +1423,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
...
@@ -1423,7 +1423,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
switch_input_callback_function_t
input_callback
,
switch_input_callback_function_t
input_callback
,
char
*
text
,
char
*
text
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
)
u
int32_
t
buflen
)
{
{
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
short
abuf
[
960
];
short
abuf
[
960
];
...
@@ -1614,7 +1614,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
...
@@ -1614,7 +1614,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
switch_input_callback_function_t
input_callback
,
switch_input_callback_function_t
input_callback
,
char
*
text
,
char
*
text
,
void
*
buf
,
void
*
buf
,
u
nsigned
in
t
buflen
)
u
int32_
t
buflen
)
{
{
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
int
interval
=
0
;
int
interval
=
0
;
...
@@ -1640,7 +1640,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
...
@@ -1640,7 +1640,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
if
(
switch_core_speech_open
(
&
sh
,
if
(
switch_core_speech_open
(
&
sh
,
tts_name
,
tts_name
,
voice_name
,
voice_name
,
(
u
nsigned
in
t
)
rate
,
(
u
int32_
t
)
rate
,
&
flags
,
&
flags
,
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_core_session_get_pool
(
session
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Invalid TTS module!
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Invalid TTS module!
\n
"
);
...
@@ -3247,7 +3247,7 @@ struct switch_ivr_menu {
...
@@ -3247,7 +3247,7 @@ struct switch_ivr_menu {
int
max_failures
;
int
max_failures
;
int
timeout
;
int
timeout
;
int
inlen
;
int
inlen
;
u
nsigned
in
t
flags
;
u
int32_
t
flags
;
struct
switch_ivr_menu_action
*
actions
;
struct
switch_ivr_menu_action
*
actions
;
struct
switch_ivr_menu
*
next
;
struct
switch_ivr_menu
*
next
;
switch_memory_pool_t
*
pool
;
switch_memory_pool_t
*
pool
;
...
@@ -3286,29 +3286,6 @@ static void switch_ivr_menu_stack(switch_ivr_menu_t **top, switch_ivr_menu_t *bo
...
@@ -3286,29 +3286,6 @@ static void switch_ivr_menu_stack(switch_ivr_menu_t **top, switch_ivr_menu_t *bo
}
}
SWITCH_DECLARE
(
int
)
switch_ivr_menu_set_flag
(
switch_ivr_menu_t
*
menu
,
unsigned
int
flags
)
{
if
(
flags
)
{
menu
->
flags
|=
flags
;
}
return
menu
->
flags
;
}
SWITCH_DECLARE
(
int
)
switch_ivr_menu_clear_flag
(
switch_ivr_menu_t
*
menu
,
unsigned
int
flags
)
{
if
(
flags
)
{
menu
->
flags
&=
~
flags
;
}
return
menu
->
flags
;
}
SWITCH_DECLARE
(
int
)
switch_ivr_menu_test_flag
(
switch_ivr_menu_t
*
menu
,
unsigned
int
flags
)
{
return
(
menu
->
flags
&
flags
);
}
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_menu_init
(
switch_ivr_menu_t
**
new
,
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_menu_init
(
switch_ivr_menu_t
**
new
,
switch_ivr_menu_t
*
main
,
switch_ivr_menu_t
*
main
,
char
*
name
,
char
*
name
,
...
@@ -3318,7 +3295,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
...
@@ -3318,7 +3295,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
int
timeout
,
int
timeout
,
int
max_failures
,
int
max_failures
,
int
inlen
,
int
inlen
,
unsigned
int
flags
,
switch_memory_pool_t
*
pool
)
switch_memory_pool_t
*
pool
)
{
{
switch_ivr_menu_t
*
menu
;
switch_ivr_menu_t
*
menu
;
...
@@ -3347,7 +3323,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
...
@@ -3347,7 +3323,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new,
menu
->
invalid_sound
=
switch_core_strdup
(
menu
->
pool
,
invalid_sound
);
menu
->
invalid_sound
=
switch_core_strdup
(
menu
->
pool
,
invalid_sound
);
menu
->
max_failures
=
max_failures
;
menu
->
max_failures
=
max_failures
;
menu
->
timeout
=
timeout
;
menu
->
timeout
=
timeout
;
menu
->
flags
|=
flags
;
menu
->
actions
=
NULL
;
menu
->
actions
=
NULL
;
menu
->
inlen
=
inlen
;
menu
->
inlen
=
inlen
;
if
(
newpool
)
{
if
(
newpool
)
{
...
@@ -3535,7 +3510,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
...
@@ -3535,7 +3510,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
status
=
SWITCH_STATUS_SUCCESS
;
status
=
SWITCH_STATUS_SUCCESS
;
break
;
break
;
case
SWITCH_IVR_ACTION_TOMAIN
:
case
SWITCH_IVR_ACTION_TOMAIN
:
switch_
ivr_menu_
set_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FALLTOMAIN
);
switch_set_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FALLTOMAIN
);
status
=
SWITCH_STATUS_BREAK
;
status
=
SWITCH_STATUS_BREAK
;
break
;
break
;
default
:
default
:
...
@@ -3547,8 +3522,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
...
@@ -3547,8 +3522,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
if
(
switch_test_flag
(
menu
,
SWITCH_IVR_MENU_FLAG_STACK
))
{
/* top level */
if
(
switch_test_flag
(
menu
,
SWITCH_IVR_MENU_FLAG_STACK
))
{
/* top level */
if
(
switch_
ivr_menu_
test_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FALLTOMAIN
))
{
/* catch the fallback and recover */
if
(
switch_test_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FALLTOMAIN
))
{
/* catch the fallback and recover */
switch_
ivr_menu_
clear_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FALLTOMAIN
);
switch_clear_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FALLTOMAIN
);
status
=
SWITCH_STATUS_SUCCESS
;
status
=
SWITCH_STATUS_SUCCESS
;
running
=
1
;
running
=
1
;
continue
;
continue
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论