Inbound through your carrier
CallerDials your number
Your carrierYour SIP trunk
SIP
UnpodOrigin endpoint
Your numberMapped to the trunk
Your appAnswer URL
Unpod runs itYou run itOutside Unpod
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.7.0" (Python 3.12+).2
Create a trunk
A trunk holds your carrier’s SIP details. Copy the trunk id (
source_ips are the addresses your carrier
sends calls from (CIDR ranges allowed).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 If your number isn’t in the list, ask the Unpod team to add it. It then shows as
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.NOT_ASSIGNED and you can map it.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, the request fails with 400
No valid unassigned numbers found. (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. Have the carrier put the number in E.164 (+91...)
in the To header: Unpod matches the call to your number by the To header. For the
SIP port and transport to give your carrier, ask the Unpod team.5
Verify
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.Sample code
Runnable code for this page in unpod-ai/sample-apps:sbc/quickstart/step3_get_number.py
List your org’s numbers and their states.
sbc/quickstart/step9_point_number.py
Set or clear a number’s inbound config.
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.