feat: auto-trunk creation, SIP gateway in metrics, gateway WS broadcast

- SIPGateway field in NodeMetric model
- HasNode() engine method
- OnNewNode callback in NATS subscriber
- Auto-create balance trunk from new node metric
- BroadcastGatewayEvent on WS hub
- Gateway status indicators in trunks UI (green/red/gray)
- SPA fallback for frontend routing
This commit is contained in:
Maksim Totmin
2026-06-25 16:56:49 +07:00
parent 533a1fba49
commit f25f8e4d01
6 changed files with 141 additions and 10 deletions
+1
View File
@@ -15,6 +15,7 @@ type NodeMetric struct {
IdleCPU float64 `json:"idle_cpu"` // 0..100 %
LoadAvg float64 `json:"load_avg"` // system load average (1m)
CallFailureRate float64 `json:"call_failure_rate"` // 0.0..100.0 %
SIPGateway string `json:"sip_gateway,omitempty"` // SIP-адрес ноды для авто-создания транка
}
// --- In-memory состояние ноды в engine ---