feat(outbound): add voice announcement on trunk congestion & clarify MoH options
This commit is contained in:
1 parent
a308f5d0ed
commit
e98410202f
4 files changed
+47
-9
No files matched your search
+22
-6
@@ -2561,14 +2561,30 @@ function openOutboundRouteModal(route = null) {
|
||||
const recMode = route ? route.record_mode : 'dontcare';
|
||||
form.querySelectorAll('input[name="record_mode"]').forEach(r => r.checked = (r.value === recMode));
|
||||
|
||||
// Destination sur congestion
|
||||
// Destination sur congestion / Trunks indisponibles
|
||||
const congSel = document.getElementById('ob-congestion-dest-select');
|
||||
if (congSel) {
|
||||
congSel.innerHTML = `
|
||||
<option value="terminate-congestion" ${(!route || route.congestion_dest === 'terminate-congestion') ? 'selected' : ''}>Congestion (Tonalité réseau saturé)</option>
|
||||
<option value="terminate-busy" ${route?.congestion_dest === 'terminate-busy' ? 'selected' : ''}>Busy (Occupation définitive)</option>
|
||||
<option value="terminate-hangup" ${route?.congestion_dest === 'terminate-hangup' ? 'selected' : ''}>Hangup (Raccrocher)</option>
|
||||
const curCong = route ? route.congestion_dest : 'all-circuits-busy';
|
||||
let congOpts = `
|
||||
<optgroup label="📢 Messages Vocaux (Recommandé)">
|
||||
<option value="all-circuits-busy" ${(curCong === 'all-circuits-busy' || (!route && curCong !== 'terminate-congestion')) ? 'selected' : ''}>📢 Message vocal standard (« Toutes les lignes sont occupées »)</option>
|
||||
`;
|
||||
const annSounds = (appState.sounds || []).filter(s => s.usage_type !== 'moh');
|
||||
if (annSounds.length > 0) {
|
||||
annSounds.forEach(s => {
|
||||
const val = `sound-${s.id}`;
|
||||
congOpts += `<option value="${val}" ${curCong === val ? 'selected' : ''}>🎙️ Annonce : ${escapeHtml(s.name)}</option>`;
|
||||
});
|
||||
}
|
||||
congOpts += `
|
||||
</optgroup>
|
||||
<optgroup label="📴 Tonalités & Raccrochage">
|
||||
<option value="terminate-congestion" ${curCong === 'terminate-congestion' ? 'selected' : ''}>Tonalité de Congestion (Bip rapide réseau saturé)</option>
|
||||
<option value="terminate-busy" ${curCong === 'terminate-busy' ? 'selected' : ''}>Tonalité d'Occupation (Bip occupé)</option>
|
||||
<option value="terminate-hangup" ${curCong === 'terminate-hangup' ? 'selected' : ''}>Raccrocher immédiatement</option>
|
||||
</optgroup>
|
||||
`;
|
||||
congSel.innerHTML = congOpts;
|
||||
}
|
||||
|
||||
// Musique d'attente (MOH)
|
||||
@@ -2576,7 +2592,7 @@ function openOutboundRouteModal(route = null) {
|
||||
if (mohSel) {
|
||||
const curMoh = route ? (route.moh_class || 'default') : 'default';
|
||||
const mohSounds = (appState.sounds || []).filter(s => s.usage_type === 'moh');
|
||||
let mohOpts = `<option value="default" ${curMoh === 'default' ? 'selected' : ''}>Défaut (Standard)</option>`;
|
||||
let mohOpts = `<option value="default" ${curMoh === 'default' ? 'selected' : ''}>🌐 Hériter du Trunk / Global (Recommandé)</option>`;
|
||||
mohSounds.forEach(s => {
|
||||
const sSlug = slugifyTrunkName(s.site_category || 'global');
|
||||
const cName = (sSlug === 'global' || sSlug === 'default') ? 'default' : `moh-${sSlug}`;
|
||||
|
||||
+1
-1
@@ -3102,7 +3102,7 @@ $currentUser = Auth::getUsername();
|
||||
<select id="ob-musicclass-select" name="moh_class" class="w-full px-3 py-2 rounded-lg bg-anthracite-900 border border-anthracite-700 text-xs text-white"></select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-slate-200 mb-1">Destination sur Congestion <span class="text-slate-400">(Échec total)</span></label>
|
||||
<label class="block text-xs font-medium text-slate-200 mb-1">📢 Si Trunks indisponibles <span class="text-slate-400">(Échec / Congestion)</span></label>
|
||||
<select id="ob-congestion-dest-select" name="congestion_dest" class="w-full px-3 py-2 rounded-lg bg-anthracite-900 border border-anthracite-700 text-xs text-white"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user