feat(frontend): Platform > Infraestrutura > FreeSWITCH/SIP Profiles/Nodes
GET /platform/freeswitch/channels|profiles|nodes fazem introspecção ESL real
(show channels/show calls/sofia status/show registrations/status/show gateways),
reaproveitando os métodos do FreeSwitchTelephonyProvider já verificados manualmente
contra o FreeSWITCH real. Mesmo padrão de conexão avulsa do PlatformHealthController
(connect → comando → disconnect).
Nunca deixa a indisponibilidade do ESL virar 500/503 — devolve { ok: false, error }
com 200, mesma filosofia do health check. Necessário: nesta VM apps/api roda fora do
Docker e a porta 8021 é deliberadamente não publicada no host, então as 3 telas
sempre mostram essa explicação aqui (mesmo texto já usado em Infraestrutura >
Saúde), mesmo com o endpoint 100% funcional — confirmado indiretamente pelo
b2bcall-fs-events, que fala ESL de dentro da rede Docker e está com heartbeat ativo.
"Nodes" mostra explicitamente 1 node (container único, sem clustering) em vez de
fingir uma lista.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFaBaBSQGhyXGEgtTYZGV8
This commit is contained in:
@@ -83,6 +83,24 @@ export interface PlatformHealth {
|
||||
checkedAt: string;
|
||||
}
|
||||
|
||||
export type EslResult<T> = { ok: true; data: T } | { ok: false; error: string };
|
||||
|
||||
export interface FreeswitchChannels {
|
||||
channels: unknown;
|
||||
calls: unknown;
|
||||
}
|
||||
|
||||
export interface FreeswitchProfiles {
|
||||
sofiaStatus: string;
|
||||
registrations: unknown;
|
||||
}
|
||||
|
||||
export interface FreeswitchNodes {
|
||||
nodeCount: number;
|
||||
status: string;
|
||||
gateways: unknown;
|
||||
}
|
||||
|
||||
export interface QuotaItem {
|
||||
key: string;
|
||||
label: string;
|
||||
|
||||
Reference in New Issue
Block a user