--- res/res_musiconhold.c 2020-05-13 18:31:03.002698680 +0200 +++ /tmp/res_musiconhold.c 2020-05-13 18:40:34.455224579 +0200 @@ -1087,9 +1087,16 @@ if (!dup) { continue; } - if (ast_begins_with(dup, "/") && strrchr(dup, '.')) { - ast_log(LOG_WARNING, "The playlist entry '%s' may include an extension, which could prevent it from playing.\n", - dup); + + if (ast_begins_with(dup, "/")) { + char *last_pos_dot = strrchr(dup, '.'); + char *last_pos_slash = strrchr(dup, '/'); + if (last_pos_dot != NULL) { + if ((int)(last_pos_dot - dup) > (int)(last_pos_slash - dup)) { + ast_log(LOG_WARNING, "The playlist entry '%s' may include an extension, which could prevent it from playing.\n", + dup); + } + } } AST_VECTOR_APPEND(&mohclass->files, dup); } else {