]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Rather than attempt to play a file, we can just check whether it exists.
authorJason Parker <jparker@digium.com>
Tue, 4 Sep 2007 20:54:51 +0000 (20:54 +0000)
committerJason Parker <jparker@digium.com>
Tue, 4 Sep 2007 20:54:51 +0000 (20:54 +0000)
Issue 10634, patch by me, testing by pabelanger, sanity checked by bweschke

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

apps/app_followme.c

index e068054ac42822397684cc6610e78b7d107d322f..075bc9f1ac0f759176bead4a5a9c699d2ca408c5 100644 (file)
@@ -991,12 +991,8 @@ static int app_exec(struct ast_channel *chan, void *data)
                        if (ast_play_and_record(chan, "vm-rec-name", namerecloc, 5, "sln", &duration, 128, 0, NULL) < 0)
                                goto outrun;
 
-               /* The following call looks like we're going to playback the file, but we're actually   */
-               /* just checking to see if we *can* play it.                                            */
-               if (ast_streamfile(chan, namerecloc, chan->language))
+               if (!ast_fileexists(namerecloc, NULL, chan->language))
                        ast_copy_string(namerecloc, "", sizeof(namerecloc));                                    
-               else
-                       ast_stopstream(chan);
 
                if (ast_streamfile(chan, targs.plsholdprompt, chan->language))
                        goto outrun;