Trim leading/trailing spaces from the filename, to deal with common user error.
[asterisk/asterisk.git] / main / pbx.c
index 18a1a48..4843022 100644 (file)
@@ -9148,7 +9148,7 @@ static int pbx_builtin_background(struct ast_channel *chan, const char *data)
        }
 
        if (!res) {
-               char *back = args.filename;
+               char *back = ast_strip(args.filename);
                char *front;
 
                ast_stopstream(chan);           /* Stop anything playing */