diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index e6e22c4874..f0228417c3 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -229,6 +229,7 @@ //define default path if ($action == "add") { $stream_path = path_join($_SESSION['switch']['sounds']['dir'], 'music', $_SESSION['domain_name'], $stream_name, $path_rate); + $stream_path = str_replace('.loc', '._loc', $stream_path); // 14.03.22 freeswitch bug } //find whether the path already exists @@ -277,6 +278,13 @@ //check target folder, move uploaded file if (!is_dir($stream_path)) { mkdir($stream_path, 0770, true); + + // 14.03.22 freeswitch bug - shouldn't be needed with freeswitch 1.10.8 + if (preg_match('|^(/usr/share/freeswitch/sounds/music/(.*?\._loc.*?))/|', $stream_path, $m)) { + $fs_bug_target = $m[2]; + $fs_bug_link = str_replace('._loc', '.loc', $m[1]); + symlink($fs_bug_target, $fs_bug_link); + } } if (is_dir($stream_path)) { if (copy($stream_file_name_temp, $stream_path.'/'.$stream_file_name)) {