refactor(sip): keep RTP timeout settings exclusively in SIP & NAT settings

This commit is contained in:
sorcier committed 2026-11-06 01:50:28 +01:00
1 parent fa8af27e46
commit 1908af5d13
3 files changed
-24

No files matched your search

-6
View File
@@ -1717,8 +1717,6 @@ try {
$local_net = trim((string)($payload['local_net'] ?? '192.168.1.0/24'));
$udp_port = max(1024, min(65535, (int)($payload['udp_port'] ?? 5060)));
$tls_port = max(1024, min(65535, (int)($payload['tls_port'] ?? 5061)));
$rtpTimeout = max(5, (int)($payload['rtp_timeout'] ?? 30));
$rtpHoldTimeout = max(0, (int)($payload['rtp_timeout_hold'] ?? 0));
$letsencrypt_domain = trim((string)($payload['letsencrypt_domain'] ?? ''));
$ami_host = trim((string)($payload['ami_host'] ?? '127.0.0.1'));
$ami_port = max(1, min(65535, (int)($payload['ami_port'] ?? 5038)));
@@ -1740,8 +1738,6 @@ try {
local_net = :local_net,
udp_port = :udp_port,
tls_port = :tls_port,
rtp_timeout = :rtp_timeout,
rtp_timeout_hold = :rtp_timeout_hold,
letsencrypt_domain = :le_domain,
ami_host = :ami_host,
ami_port = :ami_port,
@@ -1760,8 +1756,6 @@ try {
':local_net' => $local_net,
':udp_port' => $udp_port,
':tls_port' => $tls_port,
':rtp_timeout' => $rtpTimeout,
':rtp_timeout_hold' => $rtpHoldTimeout,
':le_domain' => $letsencrypt_domain,
':ami_host' => $ami_host,
':ami_port' => $ami_port,
-6
View File
@@ -3477,12 +3477,6 @@ function renderSettingsAndDiagnostics() {
form.elements['external_ip'].value = s.external_ip || '';
form.elements['udp_port'].value = s.udp_port || 5060;
form.elements['tls_port'].value = s.tls_port || 5061;
if (form.elements['rtp_timeout']) {
form.elements['rtp_timeout'].value = (s.rtp_timeout !== undefined && s.rtp_timeout !== null) ? s.rtp_timeout : 30;
}
if (form.elements['rtp_timeout_hold']) {
form.elements['rtp_timeout_hold'].value = (s.rtp_timeout_hold !== undefined && s.rtp_timeout_hold !== null) ? s.rtp_timeout_hold : 0;
}
form.elements['ami_host'].value = s.ami_host || '127.0.0.1';
form.elements['ami_port'].value = s.ami_port || 5038;
form.elements['ami_user'].value = s.ami_user || 'pbxgui';
-12
View File
@@ -1702,18 +1702,6 @@ $isDevEnv = file_exists(__DIR__ . '/../.dev')
<input type="number" name="tls_port" required
class="w-full px-3 py-2 rounded-lg bg-anthracite-950 border border-anthracite-700 text-sm text-white">
</div>
<div>
<label class="block text-xs font-medium text-slate-200 mb-1">RTP Timeout (secondes)</label>
<input type="number" name="rtp_timeout" min="5" max="300" value="30"
class="w-full px-3 py-2 rounded-lg bg-anthracite-950 border border-anthracite-700 text-sm text-white font-mono">
<p class="text-[11px] text-slate-400 mt-1">Coupure si aucun flux voix n'est reçu (défaut : 30s).</p>
</div>
<div>
<label class="block text-xs font-medium text-slate-200 mb-1">RTP Hold Timeout (Mise en attente)</label>
<input type="number" name="rtp_timeout_hold" min="0" max="3600" value="0"
class="w-full px-3 py-2 rounded-lg bg-anthracite-950 border border-anthracite-700 text-sm text-white font-mono">
<p class="text-[11px] text-slate-400 mt-1">Délai max d'un appel en attente sans RTP (0 = illimité / désactivé).</p>
</div>
<div class="sm:col-span-2">
<label class="block text-xs font-medium text-slate-200 mb-1">Langue des invites & annonces vocales (Asterisk)</label>
<select name="system_language" class="w-full px-3 py-2 rounded-lg bg-anthracite-950 border border-anthracite-700 text-sm text-white focus:ring-2 focus:ring-indigo-500">