sarman 2c69f23330
ci / go (push) Successful in 10m25s
Network interface roles, slice 4c: a routing table for each link (#65)
Co-authored-by: Shaun Arman <sarman@tftsr.com>
2026-12-03 02:53:18 +00:00

OSBC: Opensource Session Border Controller

OSBC (this repository, tftsr-osbc) is a TFTSR open-source virtual SBC: an AudioCodes Mediant VE-class session border controller built on Kamailio and RTPEngine, with a full NENA i3 Border Control Function (BCF) and standard enterprise SBC features. It is meant for mission-critical sites such as 911 call centres.

Deliverables: bare-metal ISO, qcow2 VM image, web GUI, AudioCodes-style CLI, documented REST API, offline-signed licensing with a separate license-server image, and active/standby HA.

Status (2026-12-02): M1 Foundation is largely built and the management plane, licensing and alarms have been started ahead of the GUI, the NENA i3 services and HA. The roadmap (docs/ROADMAP.md) says, item by item, what is done and what is open.

What works today

Calls and media

  • Call routing: prefix routes (a table lookup, up to 7000 routes) to UDP, TCP or TLS trunks, topology-independent dialog handling, configurable ring and call timers (CONFIG.md).
  • Trunks: alternate addresses with failover of the same call and a per-trunk distribution (failover, round_robin, weighted, random); per-trunk call admission control (max_calls, a reserve for emergency calls, a rate and burst limit); a redirect policy (a 3xx from a trunk is a 502 unless the trunk passes it).
  • Media anchoring: RTPEngine relays every call's media; the SBC refuses any SDP (or other body) that would expose a media address other than its own, including ICE candidates, and fails closed (the egress checker). SRTP toward a trunk (media_security). MSRP and nested multipart are refused until they are supported. A call that goes quiet is never released by the network (EMERGENCY.md).
  • TLS: a TLS listener, TLS trunks with the server certificate's name checked, mutual TLS, a protocol floor, and a refusal to install a configuration while a private key is unsafe (CONFIG.md).
  • Source ACL and flood protection: deny-by-default allow list, per-source and global INVITE limits with bans for unknown sources, 503 with Retry-After for trusted ones, and a budget on every log line a peer can cause (CONFIG.md).
  • Network interface roles: interfaces[] names the host's links (NIC, VLAN, bond) and their roles (management, service, HA); the listener and the media addresses must be on the links that may carry them, and the SBC renders a firewall per role keyed on the interface a packet comes in on, so a scan of each link finds only that role's ports; and the host's own network (bonds, VLANs, addresses, gateways, MTU) is configured from the model through NetworkManager, with a way back when a change cuts the SBC off (NETWORK.md).
  • Media relay hygiene: osbc-reaper releases relay sessions that no dialog holds any more (what a restart of the signalling service leaves), and alarms say when 70% and 90% of the relay's ports are in use (CONFIG.md).
  • Emergency class (licensed, nena): an emergency INVITE from a configured trunk is exempt from the INVITE limits and has its own caps (EMERGENCY.md).

Management

  • osbc-api and osbc-cli: an HTTPS REST API (users, tokens, roles, status, audit, configuration) and its command line client, with line editing and tab completion (API.md, CLI.md). The service runs unprivileged and a root helper applies changes (OPERATIONS.md).
  • Configuration: a validated JSON document rendered into Kamailio files and checked with the real kamailio -c; candidate, diff, commit, commit-confirm and rollback; export and import of a versioned document (osbc-render installs the files atomically).
  • Audit log: tamper-evident, chained, rotated, and forwarded to a collector as RFC 5424 over TLS.
  • Licensing: a free tier (5 concurrent calls), signed offline licenses with entitlements (unlimited PSAP capacity, editions, perpetual licenses, HA pairs), a grace period, a clock-rollback defence (LICENSING.md).

Alarms and monitoring (ALARMS.md, MONITORING.md)

  • A persistent alarm engine (a closed catalogue, acknowledgement by a named user, a 24-hour repeat of critical alarms) with alarms for the license, the clock, the signalling service, the media relay, TLS trunks and refused emergency calls.
  • Delivery channels with a queue of their own and a severity floor each: TLS syslog, signed webhook, InfluxDB, OTLP (logs and metrics) and SNMPv3 (traps, or informs the receiver confirms; a MIB), plus a heartbeat to every channel so a silent SBC or a broken channel is noticed.
  • Prometheus metrics (GET /v1/metrics) and an importable Grafana dashboard.

Tests: unit tests for every package and a real-stack integration suite (make integration) that runs Kamailio and RTPEngine in containers, with mutation checks for the security-relevant scenarios.

Not built yet (see the roadmap): the NENA i3 services (LoST, HELD, SIPREC), the web GUI, active/standby HA and state replication, several service links in the signaling, the HA link, the in-place upgrade from a mounted ISO, the images (ISO, qcow2), certificate expiry and CRL/OCSP handling, and the MSRP relay.

Docs

Contributing

Pull requests are welcome, and the preferred place for them is the project's Gitea server: https://gogs.tftsr.com/sarman/tftsr-osbc. The GitHub repository (https://github.com/tftsr-llc/tftsr-osbc) is a mirror that also accepts pull requests, which the maintainer imports into the primary repository. See CONTRIBUTING.md for the CLA, the sign-off and how we work, and SECURITY.md to report a vulnerability.

Development

  • make test: go test -race ./...
  • make lint: go vet, gofmt, golangci-lint

Go 1.27. Base OS for images: Rocky Linux 9 (RHEL build is an opt-in workflow).

License

OSBC is free software under the GNU Affero General Public License, version 3 only (LICENSE, NOTICE), including the 911 features. Contributions are accepted under a Contributor License Agreement (see CONTRIBUTING.md), which also lets the project offer a commercial license. The names and logos are covered by the trademark policy. OSBC runs Kamailio and RTPEngine as separate programs and ships them in its images: see THIRD_PARTY_LICENSES.md for every component and its license. Paid features, support and signed builds are described in docs/LICENSING.md; that is a service and entitlement matter, separate from the source license.

S
Description
TFTSR open-source virtual SBC: AudioCodes-parity enterprise SBC and NENA i3 BCF (Kamailio + RTPEngine)
Readme AGPL-3.0
3.6 MiB
Languages
Go 99.1%
Dockerfile 0.5%
Shell 0.3%