]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add option to save a file after pressing '0' to go to the operator (bug #3057)
authorRussell Bryant <russell@russellbryant.com>
Wed, 5 Jan 2005 05:32:47 +0000 (05:32 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 5 Jan 2005 05:32:47 +0000 (05:32 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4668 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
sounds.txt

index 1817045a73175d0c24f9dd7b8a7fa0d4307caac2..61bb3d341378b793f99f3740a6c13dfc8787a993 100755 (executable)
@@ -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:
index 5797920267bb7d66c0f65b17990d4e560e6281a5..19fc612a73aa758f95dfaeb59d91c59708587270 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