> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# SIP Integration

> Bring your own carrier to OpenCX — configure inbound and outbound SIP trunks, route calls to agents, and set up SIP-based call transfers.

<Tooltip tip="Session Initiation Protocol — a standard for setting up, managing, and tearing down voice calls over the internet.">
  SIP
</Tooltip>

trunking lets you route calls through your **own telephony provider**. Configure
trunks from **[Settings → SIP](https://platform.open.cx/settings/sip)**.

<Tip>
  Not using your own carrier? Skip this page — hosted numbers work without SIP.
  See [Create Phone Agent](/phone/create-agent) to get started.
</Tip>

## Provider Compatibility

Before you configure anything in OpenCX, ask your carrier or PBX team for these exact details:

* Confirm they can provide a standard <Tooltip tip="A SIP trunk is the connection between your carrier or PBX and OpenCX for routing voice calls over SIP. Some providers provision inbound and outbound calling as separate trunks." cta="See SIP setup" href="/phone/sip-integration">**SIP trunk**</Tooltip> for the call flow you want to support.
* Confirm whether [**inbound**](#inbound-sip-trunks) and [**outbound**](#outbound-sip-trunks) calling are provisioned separately on their side. Many carriers require separate setup for each direction.
* Ask for the <Tooltip tip="The hostname or IP address of your carrier's SIP server that OpenCX should connect to.">**signaling host**</Tooltip>, <Tooltip tip="The network port the carrier expects for SIP signaling, such as 5060 for UDP/TCP or a dedicated TLS port.">**port**</Tooltip>, and <Tooltip tip="The signaling protocol used for SIP traffic between OpenCX and your carrier: usually UDP, TCP, or TLS.">**transport**</Tooltip> they expect you to use for each direction.
* For inbound calls to OpenCX, confirm your carrier can send digest credentials. Self-serve OpenCX inbound trunks issue a generated username and password.
* For outbound calls from OpenCX, ask whether your carrier authenticates by <Tooltip tip="Digest credentials are the username and password your carrier issues for SIP authentication.">**digest credentials**</Tooltip> (username/password) or by <Tooltip tip="Source IP allowlisting means the carrier accepts traffic only from approved IP addresses instead of using SIP credentials.">**source IP allowlisting**</Tooltip>.
* Confirm which <Tooltip tip="The phone number displayed to the person receiving the call. Carriers usually restrict which numbers you can present.">**caller ID numbers**</Tooltip> you are allowed to present on outbound calls.
* If they require <Tooltip tip="IP allowlisting means your network or OpenCX SIP traffic must come from pre-approved IP addresses before the carrier accepts the call.">**IP allowlisting**</Tooltip>, allowlist the OpenCX SIP IP ranges below.
* Confirm the carrier supports at least one of the transports and codecs listed below.

<Note>
  If your inbound carrier only supports source IP allowlisting and cannot send
  SIP digest credentials, contact OpenCX before rollout. That setup is not
  self-serve from the dashboard today.
</Note>

### OpenCX SIP IP Ranges

Find the current static SIP IP ranges in **[Settings → SIP](https://platform.open.cx/settings/sip)**. Add all listed ranges to your carrier allowlist when the carrier authenticates outbound calls from OpenCX by source IP.

### Supported Transports And Codecs

For carrier setup, use:

* **Transports:** UDP, TCP, or TLS.
* **Codecs:** G.711 μ-law (PCMU), G.711 A-law (PCMA), or G.722.

OpenCX handles SIP codec negotiation automatically.

### Provider Guides

Some provider-owned guides that are useful when configuring a provider to route calls to an external SIP endpoint:

* [Twilio Elastic SIP Trunking origination settings](https://www.twilio.com/docs/sip-trunking#origination)
* [Telnyx SIP URI Calling](https://developers.telnyx.com/docs/voice/sip-trunking/features/sip-uri-calling)
* [Plivo SIP Trunking with Vapi](https://docs.plivo.com/docs/voice/ai-voice-agents/how-to-integrate-plivo-with-vapi)
* [Sinch Elastic SIP Trunking SIP endpoints](https://developers.sinch.com/docs/est/api-reference/est/sip-endpoints)
* [Wavix SIP Trunking setup guides](https://docs.wavix.com/sip-trunking/guides/setup-guides)

## Inbound SIP Trunks

Route calls from your carrier to OpenCX agents. Inbound trunks are configured entirely on our side from **[Settings → SIP](https://platform.open.cx/settings/sip)**.

What OpenCX provides:

* A SIP endpoint in the region you choose: **Global (auto-route)**, **US**, **EU**, **United Kingdom**, **India**, **Japan**, **Australia**, or **Saudi Arabia**.
* Generated digest credentials (username and password) for your carrier or <Tooltip tip="Private Branch Exchange — your internal or hosted phone system that routes inbound and outbound calls.">PBX</Tooltip> to send calls to OpenCX.
* Routing by the **dialed number** or by the <Tooltip tip="A custom SIP header that tells OpenCX which agent should handle the call.">X-OPENCX-AGENT-ID</Tooltip> header.

What we need from your carrier:

* One or more **verified [BYOC phone numbers](https://platform.open.cx/settings/phone-numbers)** that match the DIDs your carrier sends in the <Tooltip tip="SIP INVITE is the message your carrier sends to start a call. The dialed number in this message must match a verified DID for OpenCX to accept and route the call.">SIP INVITE</Tooltip>. You can also [contact us](mailto:support@open.cx) to manually add verified numbers.
* A trunk on the carrier or PBX side that points to the OpenCX SIP endpoint using the generated credentials.

## Outbound SIP Trunks

Make outbound calls from OpenCX through your carrier. Outbound trunks are configured on our side from **[Settings → SIP](https://platform.open.cx/settings/sip)**.

What OpenCX supports:

* <Tooltip tip="The network protocol used for SIP signaling between OpenCX and your carrier.">
    **Transports**
  </Tooltip>
  : **UDP** (default), **TCP**, or **TLS**.
* Authentication by <Tooltip tip="A challenge-response authentication mechanism where credentials are hashed before transmission — more secure than sending passwords in plain text.">**digest credentials**</Tooltip> (username/password) or by <Tooltip tip="Source IP allowlisting means the carrier trusts traffic from specific IP addresses instead of requiring a username and password.">**source IP allowlisting**</Tooltip>.

What we need from your carrier:

* The outbound **SIP host** and **port**.
* The **caller ID number** approved for outbound presentation.
* The outbound authentication method: digest username/password, or source IP allowlisting. For IP allowlisting, add the OpenCX SIP IP ranges (found in **[Settings → SIP](https://platform.open.cx/settings/sip)**) to the carrier-side rule.

## SIP Transfer Destinations

Route call transfers through SIP instead of the public phone network.

Transfer destinations are managed at the organization level and then assigned to agents.

* **Phone** destinations transfer to an E.164 phone number.
* **SIP** destinations transfer to a SIP URI such as `sip:support@pbx.example.com`. Optional <Tooltip tip="A challenge-response authentication mechanism where credentials are hashed before transmission — more secure than sending passwords in plain text.">digest authentication</Tooltip> (username/password) is supported for SIP endpoints.
* **Custom** destinations end the call and are useful when workflows handle pre-transfer or post-transfer behavior.

## Advanced: Dynamic Agent Routing

For advanced setups, use the <Tooltip tip="A custom SIP header that tells OpenCX which agent should handle the call, enabling dynamic routing from your own infrastructure.">X-OPENCX-AGENT-ID</Tooltip> SIP header to route inbound calls to a specific agent dynamically. Include the agent's ID (shown on the agent settings page) in the header when sending calls to the OpenCX SIP endpoint.

This is useful when:

* Multiple agents share the same trunk
* Your <Tooltip tip="Private Branch Exchange — an on-premises or cloud phone system that manages internal and external calls for your organization.">PBX</Tooltip> or carrier decides which agent should answer based on <Tooltip tip="Interactive Voice Response — an automated phone menu that routes callers based on keypad input or voice commands.">IVR</Tooltip> logic or caller data

### Supported SIP Headers

OpenCX forwards SIP `X-*` headers from inbound calls. These headers have first-class behavior:

* `X-OPENCX-AGENT-ID`: route the call to a specific phone agent.
* `X-OPENCX-CONTACT-ID`: attach the call to an existing OpenCX contact in the same organization. If the contact is missing or belongs to another organization, OpenCX falls back to phone-number matching.
* `X-OPENCX-CONTACT-CUSTOM-DATA`: JSON object merged into the contact. Values must be strings, numbers, or booleans.
* `X-OPENCX-SESSION-CUSTOM-DATA`: JSON object merged into the call session. Values must be strings, numbers, or booleans.
* `X-OPENCX-AGENT-LANGUAGE`: override the agent language for this call. Use one ISO code or a comma-separated list supported by the phone agent language settings.
* `X-OPENCX-INCLUDE-INSTRUCTION-IDS`: comma-separated instruction IDs to include for this call.

Other `X-*` SIP headers are stored on the session with the leading `X-` prefix removed.

## Related Documentation

<CardGroup cols={2}>
  <Card title="Create Phone Agent" icon="plus" href="/phone/create-agent">
    Set up an agent to receive SIP-routed calls.
  </Card>

  <Card title="Agent Configuration" icon="sliders" href="/phone/agent-config">
    Assign trunks and numbers under Telephony & Routing.
  </Card>

  <Card title="Outbound Calls" icon="phone-arrow-up-right" href="/phone/outbound-calls">
    Launch calls from the dashboard, API, or workflows.
  </Card>
</CardGroup>
