diff --git a/public/api.php b/public/api.php index 460268d..385e25e 100644 --- a/public/api.php +++ b/public/api.php @@ -140,7 +140,7 @@ try { $installedVerData = file_exists("{$appDir}/version.json") ? json_decode((string)file_get_contents("{$appDir}/version.json"), true) : []; - $installedVer = $installedVerData['version'] ?? '1.4.9'; + $installedVer = $installedVerData['version'] ?? '1.5.0'; echo json_encode([ 'success' => true, diff --git a/public/index.php b/public/index.php index b4f7f52..820f517 100644 --- a/public/index.php +++ b/public/index.php @@ -18,7 +18,7 @@ $companyLogo = trim($branding['company_logo'] ?? ''); $hasBranding = !empty($companyName) || !empty($companyLogo); $appVerData = file_exists(__DIR__ . '/../version.json') ? json_decode((string)file_get_contents(__DIR__ . '/../version.json'), true) : []; -$appVersion = $appVerData['version'] ?? '1.4.9'; +$appVersion = $appVerData['version'] ?? '1.5.0'; ?> diff --git a/src/ConfigGenerator.php b/src/ConfigGenerator.php index 4c4b780..0de324c 100644 --- a/src/ConfigGenerator.php +++ b/src/ConfigGenerator.php @@ -2219,18 +2219,24 @@ class ConfigGenerator $stmt = $this->db->prepare('SELECT slug FROM sounds WHERE id = :id'); $stmt->execute([':id' => (int)$soundRef]); $slug = $stmt->fetchColumn(); - return $slug ? "custom/{$slug}" : $fallback; + return $slug ? "/var/lib/asterisk/sounds/custom/{$slug}" : $fallback; } $ref = trim((string)$soundRef); if (str_starts_with($ref, 'sound-')) { return $this->resolveSoundFile(substr($ref, 6), $fallback); } + if (str_starts_with($ref, 'custom/')) { + return "/var/lib/asterisk/sounds/{$ref}"; + } + if (str_starts_with($ref, '/var/lib/asterisk/sounds/custom/')) { + return $ref; + } if (!str_contains($ref, '/') && !in_array($ref, ['demo-instruct', 'demo-echotest', 'pbx-invalid', 'hello-world', 'beep', 'silence/1', 'vm-goodbye'])) { $stmt = $this->db->prepare('SELECT slug FROM sounds WHERE slug = :slug OR name = :name'); $stmt->execute([':slug' => $ref, ':name' => $ref]); $slug = $stmt->fetchColumn(); if ($slug) { - return "custom/{$slug}"; + return "/var/lib/asterisk/sounds/custom/{$slug}"; } } return $ref ?: $fallback; diff --git a/version.json b/version.json index 45f41e9..3c1a95a 100644 --- a/version.json +++ b/version.json @@ -1,12 +1,12 @@ { - "version": "1.4.9", + "version": "1.5.0", "codename": "Helios", "release_date": "2026-11-04", "min_php_version": "8.2", "changelog": [ - "Résolution du chemin audio des annonces personnalisées SVI sous Debian (/sounds/fr/custom/)", - "Restauration instantanée du statut en ligne des postes après restauration de sauvegarde (sans délai de Qualify)", - "Correction des conflits de préfixes Dialplan (*801-*899 vs *8 / *80)", - "Code propre, robuste et optimisé sans surcharge" + "Gestion native et universelle des sons personnalisés par chemin absolu Asterisk (compatible multilingue français, anglais, italien, espagnol sans dépendance aux liens symboliques)", + "Préservation automatique des invites système par langue (fr, en, it, es)", + "Résolution définitive et propre des conflits de préfixes Dialplan sur les SVI/IVR (*801-*899)", + "Restauration instantanée du statut en ligne des postes après restauration de sauvegarde" ] }