SBC REST API Call Routing Integration: Architecture, Use Cases, and Implementation

SBC REST API call routing integration overview

Static route tables worked when voice networks were simple: a handful of carriers, a predictable set of numbers, and routing logic that changed once a quarter. That is not the world most service providers and enterprises operate in today. Modern voice networks route traffic across multiple carriers, enforce fraud detection rules in real time, query number portability databases on every call, and integrate with billing and CRM systems that live outside the Session Border Controller (SBC) entirely.
This is where REST API call routing integration changes the game. Instead of relying on manually configured route tables, the SBC queries external systems during call setup, receives routing instructions as structured data, and applies them before forwarding the call. The result is a voice network where routing decisions are as dynamic as the systems that inform them.
This guide explains how SBC REST API routing works, the architecture behind it, the real-world problems it solves, and what to look for when evaluating an SBC for API-driven routing.

Key Terms and Concepts
A quick-reference glossary for terms used throughout this article.
REST APIA stateless, HTTP-based interface used to query or update data on a remote system. In call routing, the SBC sends an HTTP (or HTTPS) request to an external service during call setup and receives a structured response (typically JSON) that tells the SBC how to handle the call.
Session Border Controller (SBC)A device or software instance at the border between two SIP networks, managing signaling and media on both sides independently. For API-driven routing, the SBC is the natural insertion point for external queries because it fully terminates each SIP session and can pause between call legs.
B2BUA (Back-to-Back User Agent)An SBC architecture where the device fully terminates the incoming SIP dialog and re-originates a new, independent one on the other side. The terminate-and-re-originate behavior creates a natural insertion point where the SBC can query an external system, receive a response, and apply the routing instructions before completing the outbound leg.
NAP (Network Access Point)A logical configuration block representing a trunk group or SIP peer. Routing logic, HTTP query behavior, and failover rules are configurable per NAP, enabling granular control across carriers and tenants.
DID (Direct Inward Dialing)A phone number assigned to a customer or endpoint that routes calls directly, without operator intervention. Large service providers may maintain 200,000 or more DIDs, often with mappings too dynamic to manage inside static SBC route tables.
LNP / MNP (Local / Mobile Number Portability)The ability for a customer to keep their phone number when switching carriers. A portability lookup (or “dip”) returns the current carrier-of-record for a number so calls route correctly after a port.
LRN (Local Routing Number)The number returned by an LNP database that identifies the correct terminating carrier for a ported number. The SBC replaces the dialed number with the LRN for routing purposes.
NPDI (Number Portability Database Indicator)A flag carried in signaling that tells downstream switches a portability lookup has already been performed, preventing redundant dips in SS7 environments.
STIR/SHAKENA cryptographic framework for authenticating calling numbers. The originating carrier signs the call with a digital certificate and a PASSporT token, and the terminating carrier verifies the signature. STIR/SHAKEN is mandated by the FCC for US service providers.
PASSporTA signed JSON token that carries the STIR/SHAKEN identity claim, including the originating number, destination number, and attestation level (A, B, or C). The token is inserted into the outbound SIP INVITE via the Identity header.
ASR (Answer-Seizure Ratio)The ratio of answered calls to attempted calls on a trunk. Routing engines use ASR as one input for least-cost routing and carrier quality decisions.
CDR (Call Detail Record)A structured log entry capturing the key facts of a call: calling number, called number, start/end times, duration, disposition, and routing outcome. API-driven routing decisions should be recorded in CDRs for audit and troubleshooting.

What Is SBC REST API Call Routing?

At its core, SBC REST API call routing is a mechanism where the Session Border Controller sends an HTTP or HTTPS request to an external routing engine during call setup. The external system evaluates the call parameters, applies whatever business logic it contains, and returns a structured response (typically JSON) telling the SBC how to route the call.
This is fundamentally different from the two traditional routing approaches most SBCs offer. Static routing relies on manually configured route tables: “calls to prefix 1-212 go to Carrier A, calls to prefix 1-310 go to Carrier B.” Pattern-based routing adds regex matching, so you can define more flexible rules, but the logic still lives inside the SBC’s configuration and requires manual updates when anything changes.
REST API routing moves the decision-making outside the SBC. The SBC still handles the SIP signaling, media control, and security enforcement it was built for. But the question of “where should this call go?” gets answered by an external system that can access real-time data the SBC does not have: current carrier rates, number portability records, fraud risk scores, customer account status, or any other data source reachable via HTTP.
The reason this works well on an SBC specifically, as opposed to a SIP proxy, is the Back-to-Back User Agent (B2BUA) architecture. Because the SBC fully terminates the inbound SIP session and re-originates a new one toward the destination, there is a natural insertion point between the two legs where the SBC can pause, query an external system, receive a response, and apply the routing instructions before completing the outbound leg. A SIP proxy does not have this capability because it forwards messages without terminating either session.

Why Static Route Tables Are Not Enough

Static route tables hit their limits in several predictable ways, and most service providers encounter at least two or three of these simultaneously.

Scale

When you are routing calls for 200,000 or more Direct Inward Dialing (DID) numbers, maintaining those mappings inside a typical SBC’s local configuration becomes impractical. Especially if the data changes frequently, the configuration files grow unwieldy, and every update requires a reload or, worse, a maintenance window. An external routing API lets you maintain DID-to-route mappings in a purpose-built database and query it per call.

Freshness

Number portability data, carrier rates, and fraud intelligence change constantly. A number that routed correctly to Carrier A yesterday may have been ported to Carrier B this morning. A fraud scoring engine may have flagged a calling number pattern in the last hour that your static route table knows nothing about. API-based routing queries the authoritative source every time, so the SBC always acts on current data.

Integration

The business logic that should inform routing decisions often lives in systems the SBC has no native connection to: billing platforms that determine which carrier offers the lowest rate for a given destination, CRM systems that identify high-value callers, fraud detection engines that score each call in real time, or compliance systems that enforce regulatory rules like STIR/SHAKEN attestation. REST APIs are the standard way these systems communicate, and an SBC that supports HTTP queries during call setup can participate in that ecosystem.

Multi-tenancy

Managed service providers running a single SBC for 50 or more customers need routing logic that varies by tenant. Tenant A routes through Carrier X with STIR/SHAKEN signing. Tenant B routes through Carrier Y without it. Tenant C needs least-cost routing across three carriers. Static route tables can technically handle this, but the configuration complexity scales linearly with the number of tenants, and a single misconfiguration can misroute traffic for an entire customer. An external routing engine handles per-tenant logic natively and keeps the SBC configuration clean.

How REST API Call Routing Works: Architecture

The call flow for API-integrated routing follows a consistent pattern regardless of the specific SBC implementation. Here is how it works step by step.

Step 1: Inbound SIP INVITE arrives

A call reaches the SBC on one of its Network Access Points (NAPs). The SBC extracts the call parameters: calling number, called number, source NAP or trunk group, SIP headers, and any other metadata available in the INVITE.

Step 2: Routing script triggers an HTTP query

The SBC’s routing engine, rather than immediately matching against a local route table, fires an HTTP request to an external system. The request includes the call parameters the external system needs to make a routing decision. Depending on the integration pattern, this can be a simple GET request with the called number in the URL path, or a POST request with a full JSON payload containing the source NAP, calling number, called number, and any additional context.

Step 3: External system processes the request

The external routing engine, fraud scoring service, LNP database, or business application receives the request and applies its logic. This might mean looking up the called number in a portability database, calculating a fraud risk score, querying carrier rate tables for least-cost routing, or checking a CRM for the caller’s account status.

Step 4: External system returns a JSON response

The response tells the SBC what to do. In the simplest case, it provides a remapped called number (e.g., after an LNP lookup). In more complex integrations, it returns a prioritized list of destination routes, each with a NAP name, priority value, and weight for load balancing. It may also include flags like NPDI (Number Portability Database Indicator) for downstream signaling.

Step 5: SBC applies routing instructions

The routing engine receives the response, validates it, and applies the instructions. If the response provides multiple routes, the SBC orders them by priority and attempts each in sequence until one succeeds. If the external system is unreachable or returns an error, the SBC falls back to its locally configured static routes.

Two Integration Patterns

In practice, SBC REST API routing falls into two common patterns.

Simple Lookup (GET request)

The SBC sends the called number to an external system and receives a remapped caller or called number in return. This pattern is typical for number translation services, mobile number portability (MNP) lookups, and simple database queries. The HTTP request is lightweight, the response is a single JSON object with one or two fields, and the latency is minimal.
For example, the SBC sends a GET request to https://routing-engine.example.com/v1/lookup/14155551234 and receives:

{
  "callerNumber": "14155551234",
  "destinationNumber": "12125559876"
}

The SBC replaces the called number with the value from the response and proceeds with normal route matching.

Dynamic Route Composition (POST request)

The SBC sends the full call context to an external routing engine and receives a set of destination routes. This pattern is used for least-cost routing, dynamic carrier selection, load balancing, and any scenario where the external system needs to evaluate multiple factors to determine the best path.
The SBC sends a POST request with the source NAP, calling number, and called number:

{
  "SRCNAP": "NAP_CARRIER_A",
  "SRCNUM": "14155551234",
  "DESTNUM": "442071234567"
}

The external system responds with up to four prioritized routes:

{
  "npdi": "yes",
  "ported_number": "442071234567",
  "route1": "NAP_UK_PRIMARY",
  "priority": 5,
  "weight": 100,
  "route2": "NAP_UK_SECONDARY",
  "priority": 6,
  "weight": 100,
  "route3": "NAP_UK_TERTIARY",
  "priority": 7,
  "weight": 50
}

The SBC creates dynamic routes from this response, assigns the provided priority and weight values, and combines them with any static routes already configured. The call tries the highest-priority route first and fails over to the next if that route is unavailable.

Timeout and Failover

REST API queries happen during call setup, so latency matters. A well-designed SBC allows you to configure the timeout per API query, typically between 500 milliseconds and 2,500 milliseconds. If the external system does not respond within the configured timeout, the SBC must have a defined fallback behavior: route using static tables, reject the call with an appropriate SIP response code, or apply a default route.
The best implementations also support primary and secondary API endpoints. If the primary URL fails, the SBC automatically retries against the secondary before falling back to local routing. This redundancy is critical for production environments where the external routing engine is a single point of failure.

Real-World Use Cases for SBC API Routing

REST API call routing is not a theoretical capability. These are the integration scenarios service providers and enterprises deploy in production.

Fraud Detection and Real-Time Call Scoring

Toll fraud costs the telecommunications industry billions of dollars annually. An SBC with REST API routing can query a fraud detection engine on every call, receive a risk score, and route, block, or redirect the call based on that score.
The integration works like this: the SBC sends the calling number, called number, and call metadata to a fraud scoring service (such as TransNexus ClearIP, SecureLogix, or YouMail) via HTTP. The service evaluates the call against its fraud intelligence, including known robocall sources, toll fraud patterns, call velocity anomalies, and spoofed number databases, and returns a risk score. The SBC’s routing script acts on the score: low-risk calls route normally, medium-risk calls route with logging, and high-risk calls are blocked or diverted to a fraud analysis queue.
This is not a batch process or an after-the-fact analysis. It happens during call setup, adding only a few hundred milliseconds of latency, and it evaluates every single call, not a sample.

STIR/SHAKEN Signing and Verification

The FCC’s STIR/SHAKEN mandate requires service providers to cryptographically sign outbound calls with their identity, providing the receiving party with a verified attestation of who originated the call. The SBC plays a central role in this process by querying an external STIR/SHAKEN signing service during call setup.
When an outbound call passes through the SBC, the routing script sends a signing request via HTTP to the STIR/SHAKEN signing service. The request includes the originating number (from the P-Asserted-Identity or From header), the destination number, and the attestation level (A for full attestation, B for partial, C for gateway). The signing service generates a PASSporT token, signs it with the provider’s certificate, and returns the token in an Identity header that the SBC inserts into the outbound SIP INVITE.
For production reliability, the implementation supports primary and secondary signing service URLs. If the primary signing service is unreachable after the configured timeout and retry attempts, the SBC appends a P-Identity-Bypass header to indicate that signing was attempted but unavailable, rather than blocking the call entirely. This failover mechanism ensures that a signing service outage does not stop legitimate call traffic.

Number Portability Lookups (LNP/MNP)

When a customer ports their phone number from one carrier to another, calls to that number must be routed to the new carrier, not the one originally assigned to the number block. Local Number Portability (LNP) databases track these mappings, and an SBC with REST API routing can query them in real time.
During call setup, the SBC sends the called number to an LNP lookup service. The service returns the Local Routing Number (LRN), which identifies the correct carrier for the ported number. The SBC replaces the called number with the LRN for routing purposes, ensuring the call reaches the right destination. For SS7 signaling environments, the SBC also handles the NPDI (Number Portability Database Indicator) flag, which tells downstream switches that the number has already been dipped and does not need a second lookup.
This per-call lookup eliminates the need to maintain a local copy of number portability data, which changes thousands of times daily across the North American numbering plan.

Dynamic Carrier Selection and Least-Cost Routing

Service providers with multiple carrier interconnections need to route each call over the most cost-effective path while maintaining quality. An external routing engine can evaluate real-time carrier rates, answer-seizure ratios (ASR), and trunk availability, then instruct the SBC on the optimal route.
The SBC sends the call details to the routing engine via POST request. The engine returns a prioritized list of destination NAPs with weights. The SBC creates dynamic routes from this response and attempts them in priority order. If the highest-priority carrier rejects the call or is unavailable, the SBC automatically fails over to the next route in the list.
This pattern is particularly valuable for international traffic, where carrier rates can vary significantly by destination and time of day, and where having four or more carrier options per route ensures high completion rates.

CRM and Business System Integration

Contact centers and enterprises use SBC API routing to connect voice traffic with their business systems. The SBC queries a CRM during call setup to identify the caller, determine their account status, and apply routing rules accordingly: VIP callers route to a dedicated agent team, past-due accounts route to collections, and support callers route to the queue matching their product.
This integration also enables metadata enrichment. The SBC can attach CRM-derived data to the SIP headers or CDR records so that the receiving platform (contact center, PBX, or unified communications system) has context about the caller before the agent picks up.

Implementation Best Practices

Getting SBC REST API routing into production requires attention to a few critical areas beyond the basic integration.

Set realistic timeouts

API queries happen during call setup, and callers notice delays. Configure your HTTP timeout between 500 and 2,000 milliseconds for most integrations. For fraud scoring and STIR/SHAKEN signing, where the query is mandatory, you can extend to 2,500 milliseconds with a fallback mechanism. Beyond that, you risk post-dial delay that degrades the caller experience.

Build redundancy into every integration

Configure primary and secondary API endpoints for every external system. If your fraud engine runs in AWS us-east-1, your secondary should be in a different region or provider. The SBC’s fallback path (static routing, default route, or call rejection) must be explicitly defined and tested, not assumed.

Use the right filter stage

A well-designed SBC offers multiple insertion points in the routing pipeline. Pre-routing filters (before-filters) are the right place for decisions that should happen before any route matching: authentication, fraud scoring, and caller validation. Post-match filters (after-filters) are appropriate for modifying routes after the SBC has determined its initial set: carrier selection, LNP dips, and rate-based reordering. Per-route filters (after-remap-filters) apply to individual routes after number remapping: setting specific SIP headers per carrier, adjusting codec preferences, or applying carrier-specific normalization rules.

Validate every response

Never blindly trust the external system’s response. Check the HTTP status code (anything other than 200 should trigger fallback behavior), validate the JSON structure, and verify that returned NAP names or route destinations actually exist in your SBC’s configuration. A misspelled NAP name in an API response will silently black-hole calls.

Log API decisions in CDRs

Every API-driven routing decision should be recorded in the SBC’s Call Detail Records. This is not optional. When a customer disputes a bill, when you need to troubleshoot a misrouted call, or when you want to audit your fraud engine’s effectiveness, the CDR is where you look. Include the external system’s response (or at least the key fields) as custom CDR fields.

Keep payloads small and connections persistent

The HTTP request and response should contain only the fields needed for the routing decision. Large payloads increase serialization time and network transfer time, both of which add to call setup delay. Use persistent HTTP connections (HTTP keep-alive) where your SBC supports them to eliminate TCP handshake overhead on repeated queries.

What to Look for in an SBC with REST API Routing

Not all SBCs support REST API routing, and among those that do, the implementation depth varies significantly. Here is what separates a basic API hook from a production-grade integration framework.

Configurable filter chain with multiple insertion points

You need the ability to trigger API queries at different stages of the routing process: before matching (for authentication and fraud checks), after matching (for route modification and LNP), and after remapping (for per-route header manipulation). An SBC that offers only a single “external routing” hook limits your architectural options.

Support for both GET and POST methods

Simple lookups work with GET. Dynamic route composition requires POST with a JSON body. Your SBC should support both natively without workarounds.

JSON response parsing with field-level extraction

The SBC must be able to parse a structured JSON response and map individual fields to routing parameters (destination NAP, called number, calling number, priority, weight). If the SBC treats the entire response as a single opaque value, you lose the ability to build sophisticated routing logic from external data.

Multi-route response support

The external system should be able to return multiple candidate routes in a single response, with priority and weight values for each. The SBC should create dynamic routes from these candidates and fail over through them automatically. Single-destination responses force the external system to make the failover decision, which adds latency and complexity.

Configurable timeout with explicit fallback

You must be able to set the API timeout per integration (not just a global value), define the fallback behavior when the timeout is exceeded, and configure primary/secondary API endpoints for redundancy.

HTTPS/TLS for API transport

API queries carry call metadata (calling numbers, called numbers, source information), which is sensitive data. The SBC must support HTTPS for all API queries. This is non-negotiable in production.

CDR integration for API routing decisions

The SBC should log API-driven routing decisions in its CDR output so you can audit, troubleshoot, and reconcile billing.

How ProSBC Handles REST API Call Routing

ProSBC, the software-based SBC from TelcoBridges, implements REST API call routing through a configurable Ruby routing script engine with a modular filter chain architecture.
The foundation is the BaseRouting class, which all routing scripts extend. It provides a structured 11-step routing process: before-filters, route matching, registered/DNS user lookups, route ordering, after-filters, per-route remapping, and after-remap filters. HTTP queries can be triggered at any filter stage by raising a RoutingException that pauses the routing pipeline, executes the HTTP query, and resumes the pipeline with the response data available to the script.
ProSBC’s routing engine exposes over 100 call parameters per call, including calling and called numbers, source NAP, SIP headers, codec information, and transport details. Any of these parameters can be included in an API query to an external system.
Two HTTP integration patterns are available out of the box. A GET-based lookup module sends the called number to an external system and applies the returned number mappings. A POST-based dynamic routing module sends the full call context (source NAP, calling number, called number) and receives up to four prioritized destination routes with weight values. Both support configurable timeouts, HTTPS transport, and custom HTTP headers.
For common integrations, ProSBC includes pre-built modules that handle the protocol-level details:

  • STIR/SHAKEN signing, attestation, and verification with primary/secondary signing service URLs and P-Identity-Bypass fallback.
  • TransNexus ClearIP integration for least-cost routing, fraud scoring, and STIR/SHAKEN.
  • SecureLogix integration for real-time spam risk scoring with routing strategy application.
  • YouMail integration for spam and robocall risk assessment.
  • Neustar integration for STIR/SHAKEN authentication, verification, and SIP 302 redirect handling.

For integrations that do not match a pre-built module, the Ruby scripting engine allows you to write custom logic that queries any HTTP-accessible system, parses the response, and applies routing decisions accordingly. This is not general-purpose programming; it is a configurable scripting layer specifically designed for call routing decisions.
ProSBC also provides a RESTful management API for remote configuration, status monitoring, and CDR retrieval, enabling external systems to both inform and manage the SBC.

Frequently Asked Questions

What is SBC REST API call routing?

SBC REST API call routing is a mechanism where the Session Border Controller sends an HTTP or HTTPS request to an external routing engine during call setup. The external system evaluates the call parameters, applies business logic, and returns a structured response (typically JSON) telling the SBC how to route the call. This moves routing decisions outside the SBC so they can reflect real-time data the SBC does not have locally, such as current carrier rates, portability records, fraud risk scores, and customer account status.

Why does REST API routing work well on an SBC but not on a SIP proxy?

The Back-to-Back User Agent (B2BUA) architecture of an SBC fully terminates the inbound SIP session and re-originates a new one toward the destination. That terminate-and-re-originate behavior creates a natural insertion point between the two legs where the SBC can pause, query an external system, receive a response, and apply routing instructions before completing the outbound leg. A SIP proxy forwards messages without terminating either session, so it has no equivalent pause point.

What timeout should I configure for REST API queries during call setup?

Configure your HTTP timeout between 500 and 2,000 milliseconds for most integrations. For fraud scoring and STIR/SHAKEN signing, where the query is mandatory, you can extend to 2,500 milliseconds with a fallback mechanism. Beyond that, you risk post-dial delay that degrades the caller experience.

What happens if the external API is unreachable during a call?

A well-designed SBC has an explicit fallback behavior: route using static tables, reject the call with an appropriate SIP response code, or apply a default route. The best implementations also support primary and secondary API endpoints, so if the primary URL fails the SBC automatically retries against the secondary before falling back to local routing. For STIR/SHAKEN specifically, the SBC can append a P-Identity-Bypass header to indicate that signing was attempted but unavailable, rather than blocking the call entirely.

Which integrations does ProSBC support out of the box?

ProSBC includes pre-built modules for STIR/SHAKEN signing, attestation, and verification with primary/secondary signing service URLs and P-Identity-Bypass fallback; TransNexus ClearIP for least-cost routing, fraud scoring, and STIR/SHAKEN; SecureLogix for real-time spam risk scoring; YouMail for spam and robocall risk assessment; and Neustar for STIR/SHAKEN authentication, verification, and SIP 302 redirect handling. For integrations that do not match a pre-built module, the Ruby scripting engine allows custom logic that queries any HTTP-accessible system.

Conclusion

REST API call routing turns the SBC from a static traffic switch into an intelligent routing decision engine that participates in your broader voice network ecosystem. As voice networks grow more complex (more carriers, more tenants, more regulatory requirements, and more integration points), the SBC’s ability to query external systems in real time is what keeps routing decisions accurate, current, and aligned with business logic that lives outside the SBC.

Build REST API Call Routing on ProSBC

ProSBC treats REST API call routing as a first-class capability, not an add-on. The configurable Ruby routing script engine exposes over 100 call parameters per call and lets you trigger HTTP queries at any stage of its 11-step routing pipeline: before filters, after matching, and after number remapping. GET and POST patterns are supported natively, with configurable timeouts, HTTPS transport, and primary/secondary endpoints for redundancy.

For common integrations (STIR/SHAKEN, TransNexus ClearIP, SecureLogix, YouMail, Neustar) pre-built modules handle the protocol-level details. For anything else, the scripting layer lets you query any HTTP-accessible system, parse the JSON response, and apply the result to the call before it leaves the SBC.

ProSBC Lab is a free, permanent, three-session license designed for testing exactly this kind of integration. You can deploy it on AWS, Azure, VMware, or KVM in about 20 minutes and start building routing scripts that query your own external systems, with no sales call required and no time limit. For production deployments, ProSBC starts at $1.25 per session per year, with all API routing capabilities included in the base license. TelcoBridges also offers a fully managed service option where the deployment, configuration, monitoring, and ongoing support are handled for you, starting from approximately $500 per month.

Prefer to evaluate on your own first? Start your 30-day free trial.