Implementing BYOC Cloud Trunk Provisioning with SIP Registration and Failover Configuration
What This Guide Covers
This guide details the architectural implementation of a Bring Your Own Carrier (BYOC) Cloud Trunk in Genesys Cloud CX using SIP Registration mode, including the configuration of primary and secondary failover paths. The end result is a resilient telephony connection where outbound calls route through your designated carrier, inbound calls are received via your public IP, and traffic automatically fails over to a secondary trunk during primary carrier outages.
Prerequisites, Roles & Licensing
- Licensing: Genesys Cloud CX 1, CX 2, or CX 3 license with Telephony add-on enabled.
- Roles: You require the Telephony Administrator role or a custom role with
Telephony > Trunk > EditandTelephony > Trunk > Viewpermissions. - Network:
- A publicly routable IPv4 address for your SIP Proxy/Registrar.
- Ports 5060 (SIP Control) and 10000-20000 (RTP Media) open inbound from Genesys Cloud edge nodes.
- SRTP/TLS support configured on your carrier’s SIP endpoint.
- Carrier Requirements: Your carrier must support SIP Registration (User-Agent registration to a registrar) and provide distinct credentials for Primary and Failover trunks if using a single carrier with multiple endpoints, or distinct carriers for true diversity.
The Implementation Deep-Dive
1. Carrier Network Preparation and Security Policy Verification
Before touching the Genesys UI, you must validate the carrier’s SIP stack. Genesys Cloud acts as a SIP User-Agent (UA) when using SIP Registration mode. It registers to your carrier’s SIP Registrar. Many carriers default to SIP Proxy mode (stateless), which Genesys does not support for BYOC Cloud Trunks in Registration mode.
Architectural Reasoning:
SIP Registration provides stateful knowledge of the UA’s reachability. The carrier knows exactly where the Genesys Cloud instance is located because Genesys sends periodic REGISTER requests. This allows the carrier to route inbound calls directly to the active Geneses Cloud edge node. Without registration, the carrier must rely on static IP whitelisting and stateless forwarding, which complicates failover logic and increases latency.
The Trap: TLS Certificate Validation Failures
The most common point of failure is mismatched TLS certificates. Genesys Cloud requires a valid, trusted certificate chain from the carrier. If your carrier uses a self-signed certificate or an intermediate CA not included in the standard Mozilla NSS root store, the registration will fail silently in the logs, showing TLS Handshake Error.
- Solution: Request your carrier to provide their full certificate chain (leaf + intermediate + root) and verify it using an OpenSSL s_client test from a neutral server before proceeding.
The Trap: Port Mismatch for RTP
Genesys Cloud expects RTP media on a dynamic range, typically 10000-20000 UDP. If your carrier forces RTP to a static port (e.g., 10000 only) or uses TCP for RTP, media will fail.
- Solution: Confirm with your carrier that they support dynamic RTP port negotiation via SDP in the SIP INVITE and that they do not enforce a static media port.
2. Configuring the Primary BYOC Cloud Trunk
Navigate to Admin > Telephony > Trunks and click Add Cloud Trunk.
Step 2.1: Basic Identification
- Name:
BYOC-Primary-[CarrierName] - Description:
Primary Trunk for [CarrierName] - Registration Mode - Type: Select Cloud Trunk.
Step 2.2: SIP Configuration (The Critical Layer)
- SIP Connection Mode: Select SIP Registration.
- Why: This instructs Genesys to initiate the REGISTER transaction to your carrier.
- Registrar Address: Enter your carrier’s SIP Registrar FQDN or Public IP (e.g.,
sip.carrier.example.com). - Registrar Port: Usually
5060or5061if TLS is mandatory. - Transport Protocol: Select TLS.
- Why: Genesys mandates TLS for all BYOC trunks to ensure signaling encryption. SRTP is automatically negotiated for media if the carrier supports it.
- Registration Credentials:
- Username: The SIP URI or username provided by the carrier (e.g.,
genesys@carrier.example.com). - Password: The authentication secret.
- SIP URI: The full SIP URI that the carrier expects to receive REGISTER requests from (e.g.,
sip:genesys@carrier.example.com).
- Username: The SIP URI or username provided by the carrier (e.g.,
Step 2.3: Dial Plan and Number Management
- Dial Plan: Link the existing Global Dial Plan or a specific Site Dial Plan that contains the routing logic for these numbers.
- Architectural Reasoning: The dial plan determines how outbound calls from agents or IVRs are matched to this trunk. If you do not link a dial plan, outbound calls will not route correctly even if the trunk is registered.
- Numbers: Import or manually enter the DID numbers associated with this trunk. Ensure the format matches the carrier’s expectation (e.g., E.164
+12025550199vs. 10-digit2025550199).
The Trap: Circular Registration Loops
If you enter the wrong Registrar Address (e.g., the Genesys Cloud outbound proxy instead of your carrier), Genesys will attempt to register to itself or an unreachable endpoint. This causes a “Registration Pending” state that never resolves.
- Solution: Verify the Registrar Address is the carrier’s ingress point, not Genesys.
3. Configuring the Failover BYOC Cloud Trunk
Failover in Genesys Cloud is handled at the Dial Plan level, not the Trunk level. You must create a second trunk and then configure the dial plan to prefer the primary and fallback to the secondary.
Step 3.1: Create the Secondary Trunk
Repeat the steps in Section 2, but with these distinctions:
- Name:
BYOC-Failover-[CarrierName] - Registrar Address: Use the secondary carrier’s registrar or a diverse IP for the same carrier if supported.
- Credentials: Use distinct credentials.
- Numbers: Add the same DID numbers as the primary trunk.
- Why: Genesys allows duplicate number registration across trunks. The dial plan determines which trunk is used for outbound, and inbound routing rules determine which trunk receives the call. For inbound failover, you typically configure the carrier to send traffic to the secondary registrar if the primary fails, or you use Genesys’ Trunk Group feature (available in advanced dial plan configurations) to load balance/failover.
Step 3.2: Implementing Trunk Groups for Failover
While individual trunks register independently, Trunk Groups provide the orchestration layer for failover.
- Navigate to Admin > Telephony > Trunk Groups.
- Click Add Trunk Group.
- Name:
TG-BYOC-Primary-Failover. - Add Trunks:
- Add
BYOC-Primary-[CarrierName]and set Priority to1. - Add
BYOC-Failover-[CarrierName]and set Priority to2.
- Add
- Failover Behavior:
- Failover Type: Select On Failure.
- Recovery Type: Select On Success (or Never if you want manual intervention after primary recovery).
- Architectural Reasoning: “On Failure” means Genesys will attempt to send traffic to Priority 1. If the registration is lost or the carrier returns a SIP error (e.g., 503 Service Unavailable), Genesys immediately routes to Priority 2. “On Success” ensures that if the primary trunk regains registration, traffic shifts back.
The Trap: Split-Brain Inbound Routing
If both trunks are registered and have the same DID numbers, inbound calls may arrive on either trunk depending on the carrier’s load balancing. If your IVR logic depends on specific trunk metadata (e.g., Trunk.ID), you must handle both trunk IDs in your flow.
- Solution: In your Architect flows, use the
Trunk.NameorTrunk.IDattribute to branch logic if necessary, but generally, design your IVR to be trunk-agnostic. The Dial Plan handles the routing decision for outbound; for inbound, the carrier determines the path. To enforce inbound failover, configure your carrier’s SIP proxy to forward to the secondary Genesys trunk IP only if the primary is unreachable.
4. Dial Plan Integration and Outbound Routing
The final piece is ensuring outbound calls use the Trunk Group.
- Open the Global Dial Plan (or relevant Site Dial Plan).
- Locate the Outbound Routing section.
- Add a new Route Pattern:
- Pattern:
*(catch-all) or specific patterns like+1.*for North American calls. - Trunk Group: Select
TG-BYOC-Primary-Failover. - Priority: Set appropriately relative to other patterns (e.g., higher priority for local calls, lower for international).
- Pattern:
- Save the Dial Plan.
Architectural Reasoning:
Genesys evaluates outbound calls against the dial plan in priority order. By using a Trunk Group in the dial plan, you decouple the routing logic from the physical trunk status. If the primary trunk fails, the dial plan automatically selects the next available trunk in the group without requiring changes to the flow logic.
The Trap: Specificity Conflicts
If you have multiple dial plan patterns matching the same number (e.g., one for +1.800 and one for +1.*), Genesys uses the most specific match. If your Trunk Group is only on the +1.* pattern but you have a specific +1.800 pattern pointing to a different trunk, 800 numbers will bypass your failover configuration.
- Solution: Audit your dial plan for overlapping patterns. Ensure that all patterns requiring failover point to the same Trunk Group, or that the Trunk Group is the default for all outbound traffic.
5. Validation and Testing
You must verify three states:
- Primary Registered, Failover Idle: Both trunks show “Registered” in Admin > Telephony > Trunks. The Primary trunk has a green status.
- Primary Down, Failover Active: Simulate a failure by disabling the primary trunk’s registration (temporarily remove the password or block port 5060 at the firewall). Wait for the registration to timeout (typically 60-120 seconds). Verify that outbound calls route through the Failover trunk.
- Recovery: Restore the primary trunk. Verify that traffic shifts back (if “On Success” is enabled) or remains on failover (if “Never” is selected).
Validation Tool: Genesys Cloud Diagnostic Data
Use the Telephony > Diagnostics > Call Detail Records (CDR) to verify:
- Trunk ID: Confirm the
Trunk IDin the CDR matches the expected trunk for each test. - SIP Response Codes: Look for
200 OKon REGISTER and INVITE. If you see408 Request Timeoutor503 Service Unavailable, the carrier is rejecting the call, and failover should trigger.
Validation, Edge Cases & Troubleshooting
Edge Case 1: SIP 401 Unauthorized on Registration
The Failure Condition:
The trunk status remains “Unregistered” with a log entry showing SIP 401 Unauthorized.
The Root Cause:
The username, password, or SIP URI is incorrect. Alternatively, the carrier may require a specific Realm in the authentication header that Genesys is not sending.
The Solution:
- Verify credentials with the carrier.
- Check if the carrier requires the SIP URI to include the domain (e.g.,
sip:user@domain.com) vs. just the user part. - If the carrier uses Digest Authentication, ensure the Password is the secret, not the hashed value. Genesys handles the hash calculation.
Edge Case 2: One-Way Audio (RTP Black Hole)
The Failure Condition:
Calls connect, but one party cannot hear the other. The CDR shows the call completed successfully.
The Root Cause:
NAT/Firewall issues. Genesys Cloud sends its public IP in the SDP (Session Description Protocol) answer. If your carrier’s firewall blocks UDP traffic from Genesys’ IP range on the RTP ports, the media stream drops.
The Solution:
- Verify that UDP ports 10000-20000 are open inbound from Genesys Cloud’s IP ranges (available in the Genesys Cloud IP Addresses documentation).
- Check for Asymmetric Routing. If the carrier’s SIP signaling goes through one path and media through another, ensure both paths allow the traffic.
- Enable STUN support in the trunk settings if your carrier requires it for NAT traversal.
Edge Case 3: Failover Not Triggering on Soft Failures
The Failure Condition:
The primary carrier is experiencing high latency or dropped calls, but Genesys does not fail over to the secondary trunk.
The Root Cause:
Genesys Cloud failover is triggered by SIP Registration Loss or SIP Transaction Failures (e.g., 503). It does not monitor call quality (MOS score) or latency in real-time for failover decisions. If the carrier is “up” but providing poor quality, Genesys considers the trunk healthy.
The Solution:
- Configure your carrier to return a
503 Service Unavailableon INVITE if their internal resources are overloaded. This will trigger Genesys failover. - Alternatively, implement a Health Check in your middleware (if applicable) that monitors call quality and programmatically disables the primary trunk via the Genesys REST API (
PUT /api/v2/telephony/providers/edge/trunks/{trunkId}) when quality thresholds are breached.
Edge Case 4: Duplicate DID Conflicts in Inbound Routing
The Failure Condition:
Inbound calls are dropped or routed to the wrong IVR because both trunks are registered with the same DID.
The Root Cause:
Genesys Cloud allows duplicate DIDs across trunks, but the Inbound Routing configuration must explicitly handle this. If you have two inbound routing rules for the same DID, Genesys uses the Priority of the rule, not the trunk.
The Solution:
- In Admin > IVR > Inbound Routing, ensure that only one active rule exists for each DID.
- If you need failover for inbound, configure the rule to point to a Flow that checks the
Trunk.NameorTrunk.IDand branches accordingly, or rely on the carrier’s failover mechanism to send calls to the secondary trunk’s registrar when the primary is down.