diff --git a/apps/app_record.c b/apps/app_record.c
index 29d98f76017ce5c8d29ecb248dfef2b608940222..80dd1da8995efe75c988c590e6b2ca42f4d0e6d2 100755
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -114,6 +114,7 @@ static int record_exec(struct ast_channel *chan, void *data)
 			snprintf(tmp, 256, fil, count);
 			count++;
 		} while ( ast_fileexists(tmp, ext, chan->language) != -1 );
+		pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
 	} else
 		strncpy(tmp, fil, 256-1);
 	/* end of routine mentioned */