fix(ha): auto-purge zombie channels on HA transition and enforce PJSIP rtp_timeout to fix stuck BLF keys
This commit is contained in:
1 parent
2db19ed2dd
commit
1d2d6b1911
3 files changed
+25
-2
No files matched your search
@@ -221,6 +221,19 @@ class ConfigGenerator
|
||||
$lines[] = "force_rport = yes";
|
||||
$lines[] = "rewrite_contact = yes";
|
||||
$lines[] = "direct_media = no";
|
||||
|
||||
// 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));
|
||||
$rtpHoldTimeout = max(30, $rtpTimeout * 2);
|
||||
$rtpKeepalive = max(0, (int)($settings['rtp_keepalive'] ?? 15));
|
||||
$lines[] = "rtp_timeout = {$rtpTimeout}";
|
||||
$lines[] = "rtp_timeout_hold = {$rtpHoldTimeout}";
|
||||
if ($rtpKeepalive > 0) {
|
||||
$lines[] = "rtp_keepalive = {$rtpKeepalive}";
|
||||
}
|
||||
$lines[] = "timers = yes";
|
||||
$lines[] = "timers_min_se = 90";
|
||||
$lines[] = "timers_sess_expires = 1800";
|
||||
if ($wantsTls && $hasTlsCerts) {
|
||||
// Verrouillage strict du transport TLS : refuse le repli sur UDP
|
||||
$lines[] = "transport = transport-tls";
|
||||
@@ -374,6 +387,10 @@ class ConfigGenerator
|
||||
$lines[] = "trust_id_inbound = {$trustInbound}";
|
||||
$lines[] = "trust_id_outbound = {$trustOutbound}";
|
||||
$lines[] = "timers = {$timers}";
|
||||
$rtpTimeout = max(5, (int)($settings['rtp_timeout'] ?? 30));
|
||||
$rtpHoldTimeout = max(30, $rtpTimeout * 2);
|
||||
$lines[] = "rtp_timeout = {$rtpTimeout}";
|
||||
$lines[] = "rtp_timeout_hold = {$rtpHoldTimeout}";
|
||||
if ($rtpKeepalive > 0) {
|
||||
$lines[] = "rtp_keepalive = {$rtpKeepalive}";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user