]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 298683 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Thu, 16 Dec 2010 23:30:59 +0000 (23:30 +0000)
committerJeff Peeler <jpeeler@digium.com>
Thu, 16 Dec 2010 23:30:59 +0000 (23:30 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r298683 | jpeeler | 2010-12-16 17:29:30 -0600 (Thu, 16 Dec 2010) | 2 lines

  After recording only silence for a voicemail prepending, restore backup files.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@298684 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index c2f8f7f2ac4a59d1760b7dcac2af94019e59fdd4..05f3926af62db20086637aa132051c4015ab0f97 100644 (file)
@@ -6473,6 +6473,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, vm_fmts, &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);