]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_record: RECORDED_FILE variable not being populated 91/1291/1
authorKevin Harwell <kharwell@digium.com>
Mon, 21 Sep 2015 23:06:15 +0000 (18:06 -0500)
committerKevin Harwell <kharwell@digium.com>
Mon, 21 Sep 2015 23:11:01 +0000 (18:11 -0500)
The RECORDED_FILE variable is empty unless a '%d' is specified in the filename.
This patch makes it so the variable is always set to the filename.

ASTERISK-25410 #close

Change-Id: I4ec826d8eb582ae2ad184e717be8668b74d37653

apps/app_record.c

index 233598cb633e60cfc43441221facf062ed545dc3..28316f9e579eafb20be5cd1b0647036d72d62bf5 100644 (file)
@@ -257,9 +257,10 @@ static int record_exec(struct ast_channel *chan, const char *data)
                        }
                        count++;
                } while (ast_fileexists(tmp, ext, ast_channel_language(chan)) > 0);
-               pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
        } else
                ast_copy_string(tmp, args.filename, sizeof(tmp));
+
+       pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
        /* end of routine mentioned */
 
        if (ast_channel_state(chan) != AST_STATE_UP) {