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

# Migrate from legacy SIP trunks to SIP trunks

> What changes at your carrier and in Bolna when you move from a legacy SIP trunk (sip-trunk) to SIP trunks (trunk), and how to convert an existing trunk.

<Info>
  **Legacy SIP trunks keep working.** There is no date by which you must move. New setups should use [SIP trunks](/docs/sip-trunking/overview), and this page covers moving an existing legacy trunk.
</Info>

## Am I on a legacy SIP trunk?

You are if any of these is true:

* You created your trunk with the `/sip-trunks/...` API, or on the SIP Trunks page before SIP trunks were available.
* Your agents use the `sip-trunk` telephony provider.
* Your carrier sends calls to `sip.bolna.ai` or `13.200.45.61`.

SIP trunks use the `/trunk/...` API, the `trunk` telephony provider and `trunk.bolna.ai`.

## What changes at your carrier

| | Legacy SIP trunks | SIP trunks |
| - | - | - |
| Origination URI (inbound) | `sip:sip.bolna.ai:5060` (`13.200.45.61`) | `sip:trunk.bolna.ai:5060` (`15.252.21.46`) |
| Bolna IPs to allowlist | `13.200.45.61` | `15.252.21.46` and `13.206.230.198` |
| Signalling transport | As set on the trunk | UDP or TCP, on port `5060` |
| Media (RTP) | From `13.200.45.61` | UDP `30000`-`40000`, from `15.252.21.46` |
| Codecs | G.711 μ-law and A-law | `PCMU` and `PCMA` |
| How Bolna accepts inbound calls | By IP or by username and password | By the carrier's source IPs listed on the trunk only. Any other source gets `403 Forbidden`. |
| How your carrier accepts Bolna's calls | Username and password, or IP | Bolna's two IPs on the carrier's allowlist, the carrier's username and password on the trunk, or both |
| INVITE without SDP (delayed offer) | | Refused with `488 Not Acceptable Here`. The carrier must offer SDP in the INVITE. |
| Inbound headers passed to the agent | Any header you map | `P-Asserted-Identity` and `Diversion` only |

<Warning>
  SIP trunks pass only `P-Asserted-Identity` and `Diversion` to the agent. If your agents depend on other inbound headers, such as `X-CALLERNO`, keep that trunk on legacy for now.
</Warning>

## What changes in Bolna

| | Legacy SIP trunks | SIP trunks |
| - | - | - |
| Manage trunks (API) | `/sip-trunks/trunks/...` | [`/trunk/trunks/...`](/docs/api-reference/trunks/list) |
| Map a number to an agent (API) | `POST /inbound/setup` and `/inbound/unlink` | [`PATCH /trunk/numbers/{number_id}`](/docs/api-reference/trunks/assign_agent) with `agent_id`, or `null` to unmap |
| Agent telephony provider | `sip-trunk` | `trunk`, shown in the dashboard as **SIP Trunk** |
| Simultaneous calls | No per-trunk limit | A channel limit per trunk. Outbound calls wait in the queue for a free channel; inbound calls beyond it get `486`. |
| Test calls | | Built-in inbound and outbound echo tests on each trunk |

Placing calls does not change: [`POST /call`](/docs/api-reference/calls/make) and batches work the same way, with a trunk number as `from_phone_number`. Calls on SIP trunks appear in Call History and in webhooks with the provider `trunk`.

## Convert an existing trunk

Email [enterprise@bolna.ai](mailto:enterprise@bolna.ai) with the trunk you want to move. Bolna converts it for you: the new trunk gets the legacy trunk's gateways, carrier IPs and numbers, and the agents you choose move onto it. Update your carrier with the values in [What changes at your carrier](#what-changes-at-your-carrier) during the move. While it is in progress, the SIP Trunks page shows a banner, and calls can arrive on either trunk. When the move finishes, the legacy trunk is switched off.

## Or set up a SIP trunk yourself

You can also build the new trunk alongside the legacy one and switch over when you are ready:

<Steps>
  <Step title="Create the trunk">
    Follow [Connect your carrier](/docs/sip-trunking/connect-carrier) to create the trunk, add your carrier's IPs, gateway and numbers, and run the inbound and outbound tests. While your account has a legacy trunk, **SIP Trunks** in the sidebar opens your legacy trunks: click **Open new SIP trunks** at the top of that page to create the trunk there. Once you have a SIP trunk, **SIP Trunks** opens the new page, which links back to your legacy trunks.
  </Step>

  <Step title="Assign agents to the numbers">
    On the trunk's **Numbers** tab, or with [assign agent](/docs/api-reference/trunks/assign_agent), give each number its agent. See [Inbound calls](/docs/sip-trunking/inbound-calls).
  </Step>

  <Step title="Switch inbound at your carrier">
    Point your numbers at `sip:trunk.bolna.ai:5060` and allowlist `15.252.21.46` and `13.206.230.198`. Calls follow the URI your carrier uses, so you can move one number at a time.
  </Step>

  <Step title="Switch your agents">
    Set each agent's telephony provider to **SIP Trunk** (`trunk`). Outbound calls from that agent then go through the new trunk. See [Outbound calls](/docs/sip-trunking/outbound-calls).
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="SIP trunks overview" icon="network-wired" href="/docs/sip-trunking/overview">
    How SIP trunks work, supported carriers and limits.
  </Card>

  <Card title="Connect your carrier" icon="plug" href="/docs/sip-trunking/connect-carrier">
    Create a SIP trunk step by step.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.