feat(pjsip): set default hold timeout to 600s (10 min) and add rtp_timeout_hold to settings schema
This commit is contained in:
1 parent
1d2d6b1911
commit
c1c6eab03c
2 files changed
+4
-2
No files matched your search
@@ -224,7 +224,7 @@ class ConfigGenerator
|
|||||||
|
|
||||||
// Détection automatique et purge des flux RTP fantômes / morts (ex: basculement HA, coupure réseau)
|
// Détection automatique et purge des flux RTP fantômes / morts (ex: basculement HA, coupure réseau)
|
||||||
$rtpTimeout = max(5, (int)($settings['rtp_timeout'] ?? 30));
|
$rtpTimeout = max(5, (int)($settings['rtp_timeout'] ?? 30));
|
||||||
$rtpHoldTimeout = max(30, $rtpTimeout * 2);
|
$rtpHoldTimeout = max(60, (int)($settings['rtp_timeout_hold'] ?? 600)); // Par défaut 600s = 10 minutes d'attente max
|
||||||
$rtpKeepalive = max(0, (int)($settings['rtp_keepalive'] ?? 15));
|
$rtpKeepalive = max(0, (int)($settings['rtp_keepalive'] ?? 15));
|
||||||
$lines[] = "rtp_timeout = {$rtpTimeout}";
|
$lines[] = "rtp_timeout = {$rtpTimeout}";
|
||||||
$lines[] = "rtp_timeout_hold = {$rtpHoldTimeout}";
|
$lines[] = "rtp_timeout_hold = {$rtpHoldTimeout}";
|
||||||
@@ -388,7 +388,7 @@ class ConfigGenerator
|
|||||||
$lines[] = "trust_id_outbound = {$trustOutbound}";
|
$lines[] = "trust_id_outbound = {$trustOutbound}";
|
||||||
$lines[] = "timers = {$timers}";
|
$lines[] = "timers = {$timers}";
|
||||||
$rtpTimeout = max(5, (int)($settings['rtp_timeout'] ?? 30));
|
$rtpTimeout = max(5, (int)($settings['rtp_timeout'] ?? 30));
|
||||||
$rtpHoldTimeout = max(30, $rtpTimeout * 2);
|
$rtpHoldTimeout = max(60, (int)($settings['rtp_timeout_hold'] ?? 600)); // Par défaut 600s = 10 minutes d'attente max
|
||||||
$lines[] = "rtp_timeout = {$rtpTimeout}";
|
$lines[] = "rtp_timeout = {$rtpTimeout}";
|
||||||
$lines[] = "rtp_timeout_hold = {$rtpHoldTimeout}";
|
$lines[] = "rtp_timeout_hold = {$rtpHoldTimeout}";
|
||||||
if ($rtpKeepalive > 0) {
|
if ($rtpKeepalive > 0) {
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ class Database
|
|||||||
rtp_checksums INTEGER NOT NULL DEFAULT 1,
|
rtp_checksums INTEGER NOT NULL DEFAULT 1,
|
||||||
rtp_strict INTEGER NOT NULL DEFAULT 1,
|
rtp_strict INTEGER NOT NULL DEFAULT 1,
|
||||||
rtp_timeout INTEGER NOT NULL DEFAULT 30,
|
rtp_timeout INTEGER NOT NULL DEFAULT 30,
|
||||||
|
rtp_timeout_hold INTEGER NOT NULL DEFAULT 600,
|
||||||
rtp_keepalive INTEGER NOT NULL DEFAULT 15,
|
rtp_keepalive INTEGER NOT NULL DEFAULT 15,
|
||||||
allow_anonymous_sip INTEGER NOT NULL DEFAULT 0,
|
allow_anonymous_sip INTEGER NOT NULL DEFAULT 0,
|
||||||
last_applied_at DATETIME DEFAULT NULL,
|
last_applied_at DATETIME DEFAULT NULL,
|
||||||
@@ -391,6 +392,7 @@ class Database
|
|||||||
'rtp_checksums' => "INTEGER NOT NULL DEFAULT 1",
|
'rtp_checksums' => "INTEGER NOT NULL DEFAULT 1",
|
||||||
'rtp_strict' => "INTEGER NOT NULL DEFAULT 1",
|
'rtp_strict' => "INTEGER NOT NULL DEFAULT 1",
|
||||||
'rtp_timeout' => "INTEGER NOT NULL DEFAULT 30",
|
'rtp_timeout' => "INTEGER NOT NULL DEFAULT 30",
|
||||||
|
'rtp_timeout_hold' => "INTEGER NOT NULL DEFAULT 600",
|
||||||
'rtp_keepalive' => "INTEGER NOT NULL DEFAULT 15",
|
'rtp_keepalive' => "INTEGER NOT NULL DEFAULT 15",
|
||||||
'allow_anonymous_sip' => "INTEGER NOT NULL DEFAULT 0",
|
'allow_anonymous_sip' => "INTEGER NOT NULL DEFAULT 0",
|
||||||
'system_language' => "VARCHAR(16) NOT NULL DEFAULT 'fr'",
|
'system_language' => "VARCHAR(16) NOT NULL DEFAULT 'fr'",
|
||||||
|
|||||||
Reference in new issue
Block a user