Draft v2
Status
Second draft. Structurally grounded in a full parse of the source config, validated against ~1,000 real production traces plus one complete, hop-by-hop-confirmed end-to-end call, and now confirmed against the actual inbound signaling-type discriminator (see §1). Behavioral coverage is still narrower than the structure: we have direct evidence of exactly one Destination Resolution pattern in action (sequential failover into a SIP trunk). Treat the shape of this document as solid and the specific behavioral claims as best-current-understanding, to be corrected as more traces arrive.
Scope assumption for this draft (v2 change)
Every outbound leg — whether it currently terminates on a true external SIP trunk or on what the source system models as an ISUP/TDM circuit — is treated uniformly as "hand off to a SIP proxy (customer or vendor)." This assumes a SIP-facing gateway exists (or will exist) wherever the source system currently seizes a TDM circuit directly, so the outbound side of Destination Resolution needs no SIP/ISUP fork at all — every terminal outcome is "select a proxy target," full stop. The only real scope boundary left is on the inbound side: calls that arrive via ISUP signaling are ignored entirely; only SIP-signaled inbound calls are in scope. That boundary turns out to be a single, explicit, cleanly-checkable attribute — see below.
flowchart TD
A[Call arrives on a trunk] --> F{Incoming signaling stack?}
F -->|ISUP| X[Out of scope — ignored entirely]
F -->|SIP| B[Number Classification & Attribute Tagging]
B -->|reject| R1[Call rejected]
B -->|success| C[Destination Resolution]
C -->|reject| R2[Call rejected]
C -->|resolves| S[Hand off to a SIP proxy — customer or vendor]
The inbound filter is a single explicit attribute, not an inference. The source config has a first-class field — effectively "incoming media signaling stack" — with values like SIP and ISUP, checked directly as a match condition. We found it in active use at exactly the point you'd hope: right at the trunk-call entry table and one of its near-immediate neighbors ("branch, if in from ISUP Tandem switches"), where entries explicitly match Signaling Stack = ISUP (paired with the specific incoming ISUP circuit) to give ISUP-tandem-originated calls different downstream handling. This means the SIP/ISUP inbound split is early, explicit, and localized — not something requiring deep inference from call outcomes. A pre-filter or ingress check on this same attribute is a legitimate, low-risk way to decide "is this call even in scope" before any further logic runs.
Stage 1 — Number Classification & Attribute Tagging (source system: Number Validation). A chain of pattern-match steps over the calling and/or called number. Each step either:
Stage 2 — Destination Resolution (source system: Trunk Routing). Always entered from the same single shared starting point, regardless of which path Stage 1 took to get there. A chain of steps that either:
Stage 2 terminates by selecting a SIP proxy target, or by rejecting.
| Primitive | What it does | Confirmed in a real trace? |
|---|---|---|
| Pattern match with precedence | Longest explicit match wins; if none, longest wildcard match wins; ties broken by attribute specificity, then lowest config index | Structurally yes (~1,000 traces); precedence tie-breaking specifically not yet exercised in a sample |
| Signaling-stack filter | Match on incoming call's signaling type (SIP vs ISUP) as an explicit attribute | Yes — found in active use, paired with specific circuit identifiers |
| Attribute tagging | A step sets a value that a later, distant step reads | Yes — DID-screening result set early, read much later to pick a specific proxy route |
| Deterministic chaining | Step A always leads to step B | Yes, extensively (every trace so far) |
| Sequential failover set | Try option 1; if it dead-ends, try option 2; etc., in a fixed, meaningful order | Yes — the one full trace we have is exactly this pattern |
| Weighted-random set | Pick among options by configured probability | Not yet — present in the config, not yet seen fire in a trace |
| Bulk file-based lookup | A single step matching against a large external list (e.g. per-carrier DID ranges) rather than a handful of hand-authored rules | Yes |
SIP and ISUP (e.g. MF/CAS?), and whether any of those also need to be treated as in-scope "SIP-equivalent" inbound sources.