]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Warn the user when a temporary greeting exists
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 7 Mar 2008 16:22:11 +0000 (16:22 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 7 Mar 2008 16:22:11 +0000 (16:22 +0000)
(Closes issue #11409)

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

apps/app_voicemail.c

index 79e8bf2ea4d9d07a721ad268eead8b2c2d47447c..cdbdfcb71bed60ba4b2dd4fd6a14d363d413595e 100644 (file)
@@ -6125,7 +6125,11 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct
                        cmd = 't';
                        break;
                default: 
-                       cmd = ast_play_and_wait(chan,"vm-options");
+                       snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
+                       if (ast_fileexists(prefile, NULL, NULL))
+                               cmd = ast_play_and_wait(chan, "vm-tmpexists");
+                       if (!cmd)
+                               cmd = ast_play_and_wait(chan, "vm-options");
                        if (!cmd)
                                cmd = ast_waitfordigit(chan,6000);
                        if (!cmd)