Skip to main content
Bring your own carrier: create a trunk with your carrier’s SIP details, map one of your numbers to it, and point the carrier at the Unpod origin endpoint.
Only want to make calls? You don’t need a trunk - see the Telephony APIs Quick Start.
1

Credentials

Export UNPOD_BASE_URL, UNPOD_PLATFORM_TOKEN and UNPOD_ORG_HANDLE as shown in Credentials. For Python, install the SDK with pip install "unpod>=0.6.2" (Python 3.12+).
2

Create a trunk

A trunk holds your carrier’s SIP details. source_ips are the addresses your carrier sends calls from (CIDR ranges allowed).
Copy the trunk id (data.id in the cURL response) - the next step calls it TRUNK_ID. See Create Trunk for every field.
3

Map a number to the trunk

Mapping takes your number’s id from the org’s number list. Only a NOT_ASSIGNED number can be mapped; detach an ASSIGNED number first (Detach a number). Set TRUNK_ID to the trunk id from step 2. In Python, set NUMBER to your number in E.164 and the sample finds its id; in cURL, copy the id yourself as NUMBER_ID.The SDK doesn’t expose the number id yet, so the Python sample reads the list over HTTP.
If your number isn’t in the list, it can’t be mapped yet - ask the Unpod team.The response has the origin endpoint: ingress is the host your carrier sends calls to (a bare host such as sip-lb1.unpod.tel, no sip: prefix), and accepted_source_ips are the addresses Unpod accepts them from. Each eligible number gets a row with its own ok and error, and ineligible ids are left out. If no id is an active NOT_ASSIGNED number, or none of them maps, the request fails with 400 (the SDK raises httpx.HTTPStatusError before the loop runs). See Attach Numbers to Trunk.
4

Point your carrier at the origin endpoint

In your carrier’s console, set the number’s inbound destination to the ingress value. Make sure the carrier sends from an address in accepted_source_ips - these are the source_ips you gave the trunk. Your carrier may also ask for the SIP port, the transport and the number format to put in the Request-URI; these aren’t documented yet.
5

Verify

Right after mapping, your number’s connection_state reads PENDING_VERIFY: it’s routed and waiting for its first real call. It turns LINKED once a real inbound call to it connects. NOT_LINKED means it isn’t routed yet and ERROR that routing failed (Unpod retries). See Number states.
Calls to your number now reach Unpod. To answer them in your app, set an answer URL on each of the trunk’s numbers. See For a whole SIP trunk.

Next

Answer calls on this trunk

Send the trunk’s calls to your app with an answer URL per number.

Manage Trunks

List, inspect and delete your trunks.

Unpod Number → Your SIP

No carrier? Connect a number from the Unpod pool to your SIP endpoint.

Detach numbers

Unmap numbers from the trunk.
Detach every number before you delete the trunk.