]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
After recording only silence for a voicemail prepending, restore backup files.
authorJeff Peeler <jpeeler@digium.com>
Thu, 16 Dec 2010 23:29:30 +0000 (23:29 +0000)
committerJeff Peeler <jpeeler@digium.com>
Thu, 16 Dec 2010 23:29:30 +0000 (23:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@298683 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 7ae1e44d75445c608a998cfe31848563669e73ab..fb320e01af876b51dde7f39802cc2d68ca0bed17 100644 (file)
@@ -5217,6 +5217,10 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
                                ast_channel_setoption(chan, AST_OPTION_RXGAIN, &record_gain, sizeof(record_gain), 0);
 
                        cmd = ast_play_and_prepend(chan, NULL, msgfile, 0, vmfmts, &prepend_duration, 1, silencethreshold, maxsilence);
+                       if (cmd == 'S') {
+                               ast_filerename(backup, msgfile, NULL);
+                       }
+
                        if (record_gain)
                                ast_channel_setoption(chan, AST_OPTION_RXGAIN, &zero_gain, sizeof(zero_gain), 0);