Edge Registration
Purpose
Section titled “Purpose”Describe how an edge node joins the platform and maintains its connection.
Overview
Section titled “Overview”Each edge runs a node agent and an edge-bound call engine. The node agent registers over node-authenticated HTTP, heartbeats, reconciles desired state, and runs media/recording sync. The call engine consumes the tenant’s originate subject over NATS and drives FreeSWITCH via ESL.
- Register:
POST /api/v1/nodes/register(with retry/backoff). The response carries an API key, persisted tonode.keyand presented as aBearertoken on all later calls. - Heartbeat:
POST /api/v1/nodes/heartbeatevery 30s. - Desired state:
GET /api/v1/edge/desired-state?node_id=&since=(304 when unchanged), which the agent materializes into config (carrier gateways, outbound dialplan, TLS certs).
Configuration
Section titled “Configuration”NODE_ID=edge-01 # must match the pacer's originate targetTENANT_ID=<customer edge tenant> # the single tenant this edge servesNATS_URL=nats://edge_<TENANT_UUID>:<pw>@nats-host:4222ESL_PASSWORD=... # FreeSWITCH ESL (must match across edge services)EDGE_MEDIA_ROOT=/var/lib/get2dial/mediaAGENT_RECONCILE_INTERVAL_SECONDS=30Examples
Section titled “Examples”On boot the node agent registers and begins heartbeating; the call engine
subscribes to t.<tenant>.node.<NODE_ID>.call.originate and is ready to place
calls. The agent also serves ACME HTTP-01 challenges and applies fanned-out TLS
chains for the OpenSIPS WSS listener.
- Exactly one call engine should consume a tenant’s originate subject —
duplicates compete and double-dial. A
NODE_IDmismatch silently dials zero. - Per-tenant NATS/Redis credentials are minted centrally
(
provision-edge); rotation requires the edge.envto be redeployed. /nodes/registerand/nodes/heartbeatare network-gated (unauthenticated by design in the current posture); data endpoints require the node API key.