--- title: "🔀 SIP Trunking Routing Profiles" description: "Reusable Class 4/Class 5 call routing profiles, codec policies, header normalization rules, and failover behaviors for SIP trunks in Ring2All SBC." --- ## 📖 Overview & Architecture The **Routing Profiles** module (`Routing → Routing Profiles`) in **Ring2All SBC** defines reusable signaling, media, and failover policy templates that can be attached to multiple **SIP Accounts & Trunks**, **Carriers**, or **SIP Domains**. By centralizing codec preferences, P-Asserted-Identity (PAI) / Remote-Party-ID (RPID) privacy modes, max-forwards limits, and RTPEngine transcoding directives into named profiles, carrier administrators ensure consistent behavior across hundreds of wholesale and enterprise trunks. --- ## 🎯 User Roles & Key Capabilities | Role | Primary Use Case | Key Capabilities | | :--- | :--- | :--- | | **Carrier Routing Architect** | Standardizing signaling and media policies across trunks | Create and update reusable Routing Profiles for wholesale, retail, WebRTC, and UCaaS peering tiers. | | **Provisioning Specialist** | Rapid customer trunk onboarding | Assign pre-validated Routing Profiles to new SIP trunks without manually configuring low-level header or codec rules. | | **NOC Auditor (Read-Only)** | Reviewing active trunk policies and failover timers | Inspect T1/T2 SIP timers (`fr_timer`, `fr_inv_timer`), codec lists, and topology-hiding settings. | --- ## 📋 Field & Configuration Reference | Field | Type | Description | Default | | :--- | :--- | :--- | :--- | | **Profile Name** | Text | Unique descriptive name for the routing profile (e.g., `Wholesale-G711-Strict`, `Enterprise-SRTP-HD`). | *Required* | | **Topology Hiding** | Select | Controls `Via`, `Record-Route`, and `Contact` header stripping (`Off`, `Header Stripping (topoh)`, `Dialog-Stateful (topos)`). | `Dialog-Stateful (topos)` | | **Media Relay Mode** | Select | RTPEngine anchoring mode (`Always Anchor`, `Bypass if Same Network`, `Transcode WebRTC to RTP`). | `Always Anchor` | | **Allowed Codecs** | Multi-Select | Ordered list of permitted audio codecs (`PCMU`, `PCMA`, `Opus`, `G722`, `G729`). | `Opus, PCMU, PCMA, G722` | | **Caller ID Privacy Header** | Select | Outbound identity header format (`P-Asserted-Identity`, `Remote-Party-ID`, `From Header Only`). | `P-Asserted-Identity` | | **100 Trying / Ringing Timeout (ms)** | Number | Maximum wait time (`fr_timer`) before failing over to the next carrier gateway in the LCR route. | `3000` | | **INVITE Ringing Timeout (s)** | Number | Maximum ringing duration (`fr_inv_timer`) before returning `408 Request Timeout`. | `120` | | **Associated SMR Profile** | Select | Optional SIP Manipulation Rule (SMR) profile executed on ingress or egress packets. | `None` | --- ## ⚙️ Operational Workflow 1. Navigate to **Routing → Routing Profiles** and click **New Routing Profile**. 2. Configure signaling topology hiding, RTPEngine media relay mode, codec allowlists, and failover timers. 3. Click **Save**; the profile is immediately synchronized to Kamailio shared memory (`htable`) via JSON-RPC within `< 3000ms` without dropping active calls. 4. Bind the profile to any trunk under **Routing → SIP Accounts & Trunks** or **Routing → Carriers & Groups**. --- ## 🔐 Security & RBAC Considerations - **Topology Hiding Protection**: Enabling `topos` prevents external carriers or untrusted endpoints from discovering internal **Ring2All PBX** IP addresses in SIP `Via` or `Contact` headers. - **RBAC Governance**: Modifications require `Write` permissions on `sbc.routing` and are recorded in the SBC Audit Log.