Overview
Phone calls go through a telephony provider. You have three ways to get a number:| Path | When to use it | Integration required? |
|---|---|---|
| A — Search & pick a number | You want to choose a specific number from available inventory | No |
| B — Auto-assign a number | Fastest setup — just pass your agent ID and OneInbox wires a number | No |
| C — Bring your own number (Twilio or Telnyx) | You already own a number in Twilio or Telnyx and want to keep using it | Yes |
Path A — Search and pick a number
Search available numbers, then purchase the one you want. OneInbox buys and wires it to your agent in one step. 1. Search available numbersphone_number from the search results and pass it to the purchase endpoint:
inbound_routing if you want this number to receive inbound calls. Omit it if you only need to make outbound calls from this number.
The number is now assigned to your agent. Head to Calls to make your first call.
Path B — Auto-assign a number (fastest)
Don’t want to search? Omitphone_number entirely. OneInbox auto-picks an available number and wires it to your agent in one call:
inbound_routing if you want this number to receive inbound calls. Omit it if you only need outbound. The response includes the assigned phone_number. Head to Calls to make your first call.
Path C — Bring your own number (Twilio or Telnyx)
Use a number you already own in Twilio or Telnyx. Both work the same way: set up a SIP trunk, create the integration in OneInbox, then register the number.- Twilio
- Telnyx
1. Buy the number in Twilio
Purchase a phone number from Twilio Console → Phone Numbers → Manage → Buy a number.2. Set up an Elastic SIP Trunk
OneInbox connects to Twilio via Elastic SIP Trunking.
3. Store your Twilio credentials in OneInbox
Your Account SID and Auth Token are in Twilio Console → Dashboard → Account Info.4. Register the number with OneInboxInclude
How to set up an Elastic SIP Trunk in Twilio
How to set up an Elastic SIP Trunk in Twilio
Step 1 — Create a trunkIn Twilio Console, go to Elastic SIP Trunking in the left sidebar → click Create new SIP Trunk → give it a name (e.g. “OneInbox Trunk”) → click Create.
Step 2 — Configure Termination (outbound calls)The Termination SIP URI is how OneInbox sends outbound calls through your trunk.
Step 3 — Configure Origination (inbound calls)The Origination URI tells Twilio where to send inbound calls — in this case, to OneInbox.
Step 4 — Attach your phone number
Step 5 — Enable Geographic Permissions (for international calls)If you need to call numbers outside your country (e.g. UAE, India), you must enable those regions:
After completing these steps, copy the Termination SIP URI (e.g.
Step 2 — Configure Termination (outbound calls)The Termination SIP URI is how OneInbox sends outbound calls through your trunk.
- Open your trunk → go to the Termination tab
- Twilio auto-generates a Termination SIP URI — it looks like
yourtrunk.pstn.twilio.com - Copy this — it’s the
sip_trunkvalue you’ll pass to OneInbox
Step 3 — Configure Origination (inbound calls)The Origination URI tells Twilio where to send inbound calls — in this case, to OneInbox.
- Go to the Origination tab on your trunk
- Click Add new Origination URI
- Enter
sip:voice.oneinbox.ai:5060 - Set Priority to
10and Weight to10→ click Add
Step 4 — Attach your phone number
- Go to the Numbers tab on your trunk
- Click Add a number → select the number you purchased in Step 1
- Click Add Selected
Step 5 — Enable Geographic Permissions (for international calls)If you need to call numbers outside your country (e.g. UAE, India), you must enable those regions:
- In Twilio Console, go to Voice → Settings → Geo Permissions
- Find the country or region you want to call → toggle it on
- Click Save
403 Forbidden error.After completing these steps, copy the Termination SIP URI (e.g.
yourtrunk.pstn.twilio.com) — you’ll pass it as sip_trunk below.inbound_routing if you want this number to receive inbound calls. Omit it if you only need outbound.{ "agent_id": "..." }.
Inbound calls
To make a number receive inbound calls, setinbound_routing when you register or purchase it (see paths A, B, and C above). Without inbound_routing, the number is outbound-only — calls to it will not be routed to your agent.
To add or update inbound routing on an existing number, use PATCH Update phone number:
Inbound routing
Useinbound_routing to control which agent handles inbound calls — you can use the same agent as outbound or a different one. Optionally add a fallback agent or a custom voicemail message.
| Field | What it does |
|---|---|
inbound_routing.agent_id | Override which agent handles inbound calls — independent of the number’s primary agent_id |
inbound_routing.fallback.agent_id | Agent to route to if the primary routing agent is unavailable |
inbound_routing.voicemail_message | Custom voicemail message for this number, overrides the agent’s default |