提交 ad33cdbb authored 作者: Anthony Minessale's avatar Anthony Minessale

tweak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5872 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 022d6100
......@@ -482,6 +482,7 @@ struct call_control {
vm_profile_t *profile;
switch_file_handle_t *fh;
char buf[4];
int noexit;
};
typedef struct call_control cc_t;
......@@ -497,13 +498,15 @@ static switch_status_t control_playback(switch_core_session_t *session, void *in
switch_file_handle_t *fh = cc->fh;
uint32_t pos = 0;
if (*dtmf == *cc->profile->delete_file_key || *dtmf == *cc->profile->save_file_key) {
if (!cc->noexit && (*dtmf == *cc->profile->delete_file_key || *dtmf == *cc->profile->save_file_key || *dtmf == *cc->profile->terminator_key)) {
*cc->buf = *dtmf;
return SWITCH_STATUS_BREAK;
}
if (!fh) {
return SWITCH_STATUS_SUCCESS;
}
if (*dtmf == *cc->profile->pause_key) {
if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
switch_clear_flag(fh, SWITCH_FILE_PAUSE);
......@@ -532,9 +535,6 @@ static switch_status_t control_playback(switch_core_session_t *session, void *in
return SWITCH_STATUS_SUCCESS;
}
if (*dtmf == *cc->profile->terminator_key) {
return SWITCH_STATUS_BREAK;
}
}
break;
default:
......@@ -1181,6 +1181,7 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
memset(&cc, 0, sizeof(cc));
cc.profile = profile;
cc.fh = &fh;
cc.noexit = 1;
args.buf = &cc;
status = switch_ivr_play_file(session, NULL, file_path, &args);
}
......@@ -1485,6 +1486,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, char
memset(&cc, 0, sizeof(cc));
cc.profile = profile;
cc.fh = &fh;
cc.noexit = 1;
args.buf = &cc;
if (!switch_strlen_zero(cbt.greeting_path)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论