YepSBC documentation

The decision API

The contract between YepSBC and your routing service: four endpoints, an execution plan, failure modes and delivery guarantees, with a trimmed example.

YepSBC documentation

YepSBC documentation

  1. Overview
  2. The decision API
  3. Trunks, peers and security
  4. Media
  5. High availability and failover
  6. CDRs and SIP traces
  7. Operations and monitoring
  8. Deployment requirements

Other products

YepSBC executes plans and never invents them. The decision API is the contract that carries those plans: YepSBC is the HTTP client, your service is the server, and nothing on the call path requires your service to reach the SBC.

Endpoints

EndpointDirectionPurpose
POST /v1/calls/routeSBC to service, synchronousOne routing decision per new call, and per transfer
POST /v1/provisioningSBC to service, polledWhich sources may send calls, and optionally which peers to monitor
POST /v1/call-eventsSBC to service, asynchronous batchesCall lifecycle events
POST /v1/cdrSBC to service, asynchronousCall detail records

Only the routing endpoint is on the call path. The other three are asynchronous and tolerate your service being down.

Conventions

  • JSON bodies, UTF-8, timestamps in RFC 3339 UTC.
  • Authentication is a bearer token configured on the SBC, optionally with TLS client certificates. Certificate validation is on by default and a private CA can be configured.
  • Every request carries contract_version. Answer with the same major version. Minor versions are additive, so a service written against an older minor version keeps working.
  • A plan with an unknown top-level key is invalid and fails the call, unless the key sits under optional or starts with x-. This catches typos at integration time.
  • Redirects are never followed.

The route request

The request describes the call: where it came from, who is calling whom, what the caller's SIP message looked like and what media it offered.

{
  "contract_version": "1.4",
  "request_id": "0199b4ce-7281-7f24-9c8e-a12b00000001",
  "call_id": "0199b4ce-7281-7f24-9c8e-a12b00000001",
  "node": "sbc-a",
  "timestamp": "2026-11-19T10:42:08.100Z",
  "ingress": {"trunk_id": "customer-1", "source_ip": "192.0.2.20", "source_port": 5060, "transport": "udp"},
  "call": {"calling": "+447700900123", "called": "+442079460123"},
  "sip": {"request_uri": "sip:+442079460123@sbc.example.com", "user_agent": "example-pbx"},
  "media": {"offered_codecs": ["PCMU", "PCMA", "telephone-event"], "has_sdp": true}
}

request_id doubles as an idempotency key, so a retry after a connection error can be deduplicated.

The execution plan

{
  "contract_version": "1.4",
  "decision_id": "dec_982374",
  "policy_revision": "8271",
  "action": "route",
  "destinations": [
    {"uri": "sip:2079460123@192.0.2.50:5060", "transport": "udp", "timeout_ms": 3000, "peer_id": "carrier-1"},
    {"uri": "sip:2079460123@carrier2.example.com", "timeout_ms": 3000, "peer_id": "carrier-2"}
  ],
  "identity": {"calling": "+447700900123", "called": "2079460123"},
  "headers": {"set": {"X-Account": "acct-7"}, "remove": ["Remote-Party-ID"]},
  "media": {"anchor": true, "allowed_codecs": ["PCMU", "PCMA"], "srtp": {"ingress": "allow", "egress": "sdes"}},
  "failure_policy": {"retry_on": [408, 500, 502, 503, 504], "on_exhausted": {"code": 503}},
  "cache": {"key": "customer-1:44207946*", "ttl_seconds": 300}
}

A reject plan is shorter: {"action": "reject", "sip_response": {"code": 403, "reason": "Forbidden"}}.

How YepSBC executes a plan

  • Destinations are tried in order. A destination that does not answer within its timeout is cancelled and the next one is tried. A final failure advances to the next destination only if its code is in the retry set. Otherwise it goes back to the caller.
  • DNS. A host name without a port is resolved as RFC 3263 describes, with SRV and NAPTR records, and the published servers are tried in turn before the next destination is considered. A literal address or an explicit port is used as given.
  • Identity. identity.called becomes the egress request URI user and identity.calling the From user.
  • Header operations apply in the order remove, replace, set, copy. Protected headers such as Via, Call-ID and CSeq cannot be touched, and a plan that tries is rejected.
  • Media. anchor, allowed_codecs, DTMF handling and the SRTP policy per side are set per call. See Media.
  • Recording. A plan can ask for the call to be recorded to one or more SIPREC servers.
  • Peer identifiers. Set peer_id on every destination you intend to rate. It comes back in the CDR as the selected peer.

Transfers

A REFER on an established call is executed by the SBC. It sends an ordinary route request with an extra transfer block describing the referral, and your service answers with a plan for the target or a reject. The call keeps its UUID and the CDR records the transfer.

Provisioning

Provisioning answers who may send calls. Destinations always arrive in a plan. The SBC polls the endpoint, validates the answer, swaps its trunk list atomically and matches sources in memory, so an unknown source never costs a round trip. Answering "unchanged" or HTTP 304 skips the swap.

A provisioning outage never becomes a telephony outage:

ConditionEffect
Service unreachable or erroringThe list in force stays, with retries and backoff
Payload fails validationThe list in force stays, and the rejection is logged and counted
Empty trunk listRejected, because it would block every call
Never succeeded since startThe node runs on its local bootstrap list

When the service fails

The routing call has a strict deadline. A circuit breaker opens after consecutive failures and stops calling the service for a short period.

ModeBehaviour when the service is unavailable, slow or answers with an invalid plan
FAIL_CLOSEDReply to the caller with a configured SIP code
CACHE_ONLYServe a matching cached plan, otherwise fail closed

A plan is cached only if it carries a cache instruction, which is your authorisation for reuse. Design the service for single-digit millisecond answers from memory. After a policy change that must take effect before cache entries expire, flush the cache through the management API.

Events and CDRs

Events and CDRs are posted in batches and may arrive more than once, so receivers deduplicate on event_id and call_uuid. See CDRs and SIP traces for the record format and delivery guarantees.

Specification and conformance

The contract is published as an OpenAPI 3.1 specification with example payloads generated from the SBC's own types. A conformance checker validates your service with the same decoder the SBC uses, so a service that passes it will be accepted. A decision mock for lab use ships with the SBC. The specification, examples and checker are provided to customers and evaluating teams on request. Get in touch.

Contact sales

Questions about YepSBC?

Ask an engineer about your deployment, or request the full interface specifications and a demonstration of YepSBC on a traffic profile like yours.

  1. We reply within one business day to arrange a time.
  2. A scoping call about your traffic, network and billing model.
  3. A demonstration on a traffic profile like yours, and a lab deployment if your engineers want one.

Prefer email? hello@yeptelcosoft.com

What would you like?
Interested in

We reply within one business day. We use your details only to respond to your request. Privacy notice