提交 293d7254 authored 作者: Anthony Minessale's avatar Anthony Minessale

add valet_announce_slot variable

上级 64806d2d
......@@ -114,7 +114,13 @@ SWITCH_STANDARD_APP(valet_parking_function)
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_event_t *event;
char dtmf_buf[128] = "";
int is_auto = 0;
int is_auto = 0, play_announce = 1;
const char *var;
if ((var = switch_channel_get_variable(channel, "valet_announce_slot"))) {
play_announce = switch_true(var);
}
if (!zstr(data) && (lbuf = switch_core_session_strdup(session, data))
&& (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) >= 2) {
......@@ -254,7 +260,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
switch_core_session_t *b_session;
if ((b_session = switch_core_session_locate(uuid))) {
switch_ivr_phrase_macro(session, "valet_announce_ext", tmp, NULL, NULL);
if (play_announce) {
switch_ivr_phrase_macro(session, "valet_announce_ext", tmp, NULL, NULL);
}
switch_ivr_session_transfer(b_session, dest, "inline", NULL);
switch_mutex_unlock(lot->mutex);
switch_core_session_rwunlock(b_session);
......@@ -263,7 +271,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
}
}
switch_ivr_phrase_macro(session, "valet_announce_ext", tmp, NULL, NULL);
if (play_announce) {
switch_ivr_phrase_macro(session, "valet_announce_ext", tmp, NULL, NULL);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论