Move voicemail beep (bug #2594)
authorMark Spencer <markster@digium.com>
Thu, 7 Oct 2004 16:07:45 +0000 (16:07 +0000)
committerMark Spencer <markster@digium.com>
Thu, 7 Oct 2004 16:07:45 +0000 (16:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3930 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 6ea59bf..a2be7a3 100755 (executable)
@@ -1437,12 +1437,6 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int
                        free_user(vmu);
                        return 0;
                }
-               if (res >= 0) {
-                       /* Unless we're *really* silent, try to send the beep */
-                       res = ast_streamfile(chan, "beep", chan->language);
-                       if (!res)
-                               res = ast_waitstream(chan, "");
-               }
                if (res < 0) {
                        free_user(vmu);
                        return -1;
@@ -1457,6 +1451,12 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int
                                        break;
                                msgnum++;
                        } while (msgnum < MAXMSG);
+                       if (res >= 0) {
+                               /* Unless we're *really* silent, try to send the beep */
+                               res = ast_streamfile(chan, "beep", chan->language);
+                               if (!res)
+                                       res = ast_waitstream(chan, "");
+                       }
                        if (msgnum < MAXMSG) {
                                /* Store information */
                                snprintf(txtfile, sizeof(txtfile), "%s.txt", fn);