Fix "0" auto deleting messages from voicemail (bug #3057)
authorMark Spencer <markster@digium.com>
Mon, 3 Jan 2005 02:01:58 +0000 (02:01 +0000)
committerMark Spencer <markster@digium.com>
Mon, 3 Jan 2005 02:01:58 +0000 (02:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4642 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
sounds.txt
sounds/vm-saveoper.gsm [new file with mode: 0755]

index 92ca126..b4d4c9d 100755 (executable)
@@ -5899,8 +5899,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");
-                               DELETE(recordfile, -1, 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");
+                                       DELETE(recordfile, -1, recordfile);
+                                       cmd = '0';
+                               }
                        }
                        return cmd;
                default:
index 065f482..0095f63 100755 (executable)
 
 %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
diff --git a/sounds/vm-saveoper.gsm b/sounds/vm-saveoper.gsm
new file mode 100755 (executable)
index 0000000..1fa92a2
Binary files /dev/null and b/sounds/vm-saveoper.gsm differ