YepSBC runs as an active/standby pair. Two nodes share a service address. The active node handles all traffic and streams a snapshot of every established call to the standby, which restores those calls if the active node fails.
What is replicated
For each established call the active node sends the standby:
- the stored execution plan
- both SIP dialogs: tags, CSeq spaces, route sets and remote targets
- the media session reference
- timestamps and the event sequence
The stream runs over an authenticated TCP connection between the nodes. The standby reports whether it is connected and how far behind it is, and the active node raises a warning when no standby is connected. The active node keeps carrying calls in that state.
Choosing the active node
Two modes decide which node is active and moves the service address.
| Mode | How it works |
|---|---|
| Built-in election | Nodes exchange authenticated UDP heartbeats. The highest-priority live node becomes active, runs an operator-supplied takeover command to claim the service address, and restores replicated calls. A returning node stays standby unless pre-emption is enabled. When a healed partition leaves two active nodes, the higher epoch wins. |
| keepalived | VRRP moves the service address. A notify script tells the SBC its role through the management API. |
Both nodes share one cluster configuration and differ only in their node files. The management API can push a cluster configuration to both nodes, standby first, and reports any drift between them.
What a takeover does
When the active node fails:
- The standby detects the failure from missed heartbeats or from the VRRP transition.
- It takes the service address and becomes active.
- It restores every call that was established, including dialogs, plan and media session.
- BYE, re-INVITE, UPDATE and INFO on those calls work as before.
Media continues because rtpengine is either shared between the nodes or independently redundant. Calls that were still in setup when the active node failed are dropped, because their transactions lived on the failed node. A transfer in progress at that moment is lost, and the call itself continues as it was. An active SIPREC session is replicated and ended with the call after a takeover, and whether the media copy keeps flowing depends on the media engine surviving.
Planned switchover
Under keepalived, a planned switchover uses a step-down request on the active node. A forced role change is the wrong tool: it changes only the SBC and leaves the service address where it is, so the node would answer 503 to every call. A step-down makes the keepalived track check fail, the address moves to the peer within a few seconds, the peer becomes active and restores the established calls. The request is refused unless the node is active under external control and a standby is connected and replicating. Calls in setup are dropped.
sbcctl cluster status
sbcctl calls --state ESTABLISHED
sbcctl cluster step-down
The first command shows roles, epochs, peer liveness and replication lag. The second lists the calls that would survive a failover.
Failure of other components
| Component | Effect |
|---|---|
| Decision service | Per-deployment behaviour: fail closed or cached plans. Established calls are unaffected |
| Media engine | New calls fail with 503, established calls continue |
| Event or CDR receiver | Queues with retries, optionally spooled to disk |
| Standby | Active node carries on and warns |
Delivery across a failover
When event and CDR spools are enabled, records are written to disk before delivery is attempted and the cursor advances only when the receiver acknowledges them. A restart resumes where it stopped. A call restored after takeover is marked as recovered in its CDR and emits a recovery event, so the record shows which node ended it.
Operating notes
- Use the same cluster file on both nodes and check the drift report after every change.
- Watch the standby connection and replication lag metrics. A standby that is not connected provides no protection.
- Test a failover in a lab with the call mix you carry before relying on it.
See Operations for the metrics and the management API, and Deployment for the reference layout.