]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 300918 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Fri, 7 Jan 2011 17:23:37 +0000 (17:23 +0000)
committerJeff Peeler <jpeeler@digium.com>
Fri, 7 Jan 2011 17:23:37 +0000 (17:23 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r300918 | jpeeler | 2011-01-07 11:13:21 -0600 (Fri, 07 Jan 2011) | 7 lines

  Ensure good bye prompt in voicemail is played at the correct time.

  Specifically in the case of timing out but not leaving voicemail nothing
  should be heard. And when leaving voicemail it should be heard.

  ABE-2647
........

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

apps/app_voicemail.c

index 05f3926af62db20086637aa132051c4015ab0f97..9f97fde216e62f0d20647fc0b6224dc0c2a282c9 100644 (file)
@@ -5710,7 +5710,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                }
                if (res == '0') {
                        goto transfer;
-               } else if (res > 0)
+               } else if (res > 0 && res != 't')
                        res = 0;
 
                if (duration < vmminsecs)
@@ -10015,6 +10015,11 @@ static int vm_exec(struct ast_channel *chan, void *data)
        }
 
        res = leave_voicemail(chan, args.argv0, &leave_options);
+       if (res == 't') {
+               ast_play_and_wait(chan, "vm-goodbye");
+               res = 0;
+       }
+
        if (res == OPERATOR_EXIT) {
                res = 0;
        }
@@ -11992,10 +11997,10 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
                /* Hang up or timeout, so delete the recording. */
                ast_filedelete(tempfile, NULL);
        }
-       if (cmd == 't')
-               cmd = 0;
-       else if (outsidecaller) /* won't play if time out occurs */
+
+       if (cmd != 't' && outsidecaller)
                ast_play_and_wait(chan, "vm-goodbye");
+
        return cmd;
 }