YepSBC is a carrier session border controller written in Go. It terminates SIP from customers and carriers, builds a separate outbound call for each inbound one, and carries the media through a media engine. It keeps no routing tables. For each new call it asks an external decision service what to do and executes the answer.
This section documents what the current release does. For the product summary see YepSBC.
Division of responsibility
| The decision service owns | YepSBC owns |
|---|---|
| Customers, carriers and which sources may send calls | SIP parsing, transactions, dialogs and the B2BUA |
| Routing, least-cost selection, time-of-day rules | Ordered destination attempts, retries, timeouts, DNS failover |
| Number normalisation and number ownership | Identity rewriting and header manipulation as instructed |
| Rating, billing and balances | CDRs with a closed vocabulary and per-attempt outcomes |
| Commercial fraud policy | Infrastructure protection: ACLs, rate limits, blocklists, admission control |
| Interpretation of peer health for routing | OPTIONS probing with hysteresis and state reporting |
The decision service can be YepBoss or any system you operate that implements the published contract.
Architecture
A node is one daemon, sbcd, plus a media engine. The daemon has these layers:
- Transport serves UDP, TCP, TLS, WebSocket and secure WebSocket. A packet guard in front of the parser drops traffic from blocked or over-rate sources cheaply.
- Parser and transactions implement RFC 3261 client and server transactions, including the RFC 6026 accepted states, with a fuzz-tested parser.
- Engine is the B2BUA. Every call is an actor with its own mailbox, so there is no global lock on the call path.
- Decision client speaks the versioned contract over HTTP/1.1 or HTTP/2, with deadlines, one idempotent retry on connection errors, a circuit breaker and an explicitly authorised cache.
- Execution applies the returned plan: header operations, identity rewriting, destination sequencing and codec policy.
- Media drives rtpengine over its control protocol. Lab modes without rtpengine exist for tests.
- HA replicates established calls to a standby and restores them on takeover.
- Telemetry provides Prometheus metrics, JSON logs, per-call SIP traces, events and CDRs.
A normal call
- An INVITE arrives. The guard identifies the trunk by source address and applies rate and concurrency limits. The transaction layer answers 100 Trying.
- The engine creates the call, assigns it a UUID, and sends a route request to the decision service. A CANCEL arriving meanwhile is honoured at once.
- The plan is stored with the call. A reject plan produces a final response. A route plan applies codec policy to the offer and hands it to the media engine.
- For each destination in order, the SBC sends a new INVITE with its own Call-ID, tags, Via and Contact, and the identity and headers the plan specified. Failures listed in the plan's retry set, and timeouts, advance to the next destination.
- On a 2xx the SBC acknowledges the egress leg, passes the answer through the media engine, answers the caller, and replicates the call to the standby.
- Mid-call requests are relayed end to end. A BYE on either leg releases the other.
- On termination the SBC removes the media session, collects RTP statistics, emits the final event and writes the CDR.
Session timers (RFC 4028) are negotiated with each side separately. REFER transfers are executed by the SBC and routed by the decision service like any other destination.
Failure behaviour
| Dependency | What YepSBC does |
|---|---|
| Decision service | Fail closed with a configured SIP response, or serve a matching cached plan, per deployment |
| Event receiver | Bounded queue with retries; optional on-disk spool for at-least-once delivery |
| CDR receiver or file | Bounded queue; optional on-disk spool; the CDR file is written regardless |
| Media engine | New calls fail with 503; established calls continue |
| Standby node | The active node continues and reports the missing standby |
| Metrics and logging | Never block calls |
In this section
- The decision API: the four endpoints, a request and a plan, failure modes.
- Trunks, peers and security: identifying sources, admission control, TLS, peer monitoring.
- Media: anchoring, codec policy, SRTP, WebRTC and SIPREC.
- High availability: replication, takeover and what survives.
- CDRs and SIP traces: the record format, delivery guarantees, tracing.
- Operations: management API, metrics, configuration changes.
- Deployment: requirements and reference layout.
The full OpenAPI 3.1 specification, example payloads and the conformance checker are provided to customers and evaluating teams on request. Get in touch.