From: Russell Bryant Date: Wed, 5 Jan 2005 05:32:47 +0000 (+0000) Subject: Add option to save a file after pressing '0' to go to the operator (bug #3057) X-Git-Tag: 1.0.11.1~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de117b689e6ae3919f8ad042f9bf1debac629e52;p=thirdparty%2Fasterisk.git Add option to save a file after pressing '0' to go to the operator (bug #3057) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4668 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 1817045a73..61bb3d3413 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4695,8 +4695,17 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re #endif case '0': if (message_exists || recorded) { - ast_play_and_wait(chan, "vm-deleted"); - vm_delete(recordfile); + cmd = ast_play_and_wait(chan, "vm-saveoper"); + if (!cmd) + cmd = ast_waitfordigit(chan, 3000); + if (cmd == '1') { + ast_play_and_wait(chan, "vm-msgsaved"); + cmd = '0'; + } else { + ast_play_and_wait(chan, "vm-deleted"); + vm_delete(recordfile); + cmd = '0'; + } } return cmd; default: diff --git a/sounds.txt b/sounds.txt index 5797920267..19fc612a73 100755 --- a/sounds.txt +++ b/sounds.txt @@ -447,6 +447,8 @@ %vm-advopts.gsm%press 3 for advanced options +%vm-saveoper.gsm%press 1 to accept this recording, or continue to hold + %vm-toreply.gsm%press 1 to send a reply %vm-tocallback.gsm%press 2 to call the person who sent this message