A phone number gives your agent an address on the phone network. You keep your numbers with your own carrier, and your carrier bills the phone line. Tried does not charge for it.
- Connect your own number over SIP trunking. This is what the dashboard offers: a Twilio number on your own Twilio Elastic SIP trunk, or a number from any carrier or PBX. See Custom telephony and Twilio.
- Buy a number through the API (
POST /create-phone-number). This is not offered today: the endpoint exists for Retell compatibility and is documented below for reference, but Tried does not sell numbers or charge for phone lines.
Either way, the number ends up in the Phone Numbers list with the same settings: inbound and outbound agents, inbound webhook, country allow lists, version binding, fallback number and calls per second.
Connect a number in the dashboard#
Open Phone Numbers#
In the sidebar under Deploy, click Phone Numbers, then the + button and Connect via SIP trunking. On an empty workspace, click Connect your number.
Follow the Twilio guide if you use Twilio#
The dialog opens with Using a Twilio number? Setup steps. It walks through creating an Elastic SIP trunk in your Twilio console and shows the origination URI and IP ranges to paste. See Twilio for the same steps with more detail.
Fill in the trunk details#
Enter Phone Number in E.164 format (for example +61290001234), Termination URI, Transport, Media encryption, and the SIP username and SIP password your carrier expects. Optionally set Fallback number, Calls per second, Nickname (optional) and Inbound agent (optional).
Test and save#
Click Test SIP connection to send a SIP OPTIONS probe to the termination URI, then Save. The number appears in the list and is provisioned on LiveKit SIP.
Buy a number through the API#
POST /create-phone-number searches the provider for an available number, orders it, stores it in your workspace and provisions it. It returns HTTP 201 with the phone number object.
curl -X POST https://api.tried.com.au/create-phone-number \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"country_code": "AU",
"area_code": 2,
"nickname": "Sydney reception",
"inbound_agents": [{ "agent_id": "agent_8e0c...", "weight": 1 }],
"fallback_number": "+61290000000"
}'| Field | Type | Default | Description |
|---|---|---|---|
country_code |
string | "AU" |
ISO 3166 two-letter code, upper case. Telnyx searches any country; Twilio searches the countries it sells. |
number_provider |
"telnyx" | "twilio" |
"telnyx" |
Who sells the number. |
area_code |
integer | none | Area code (Telnyx national_destination_code, Twilio AreaCode). Ignored for toll-free. |
toll_free |
boolean | false |
Search toll-free numbers instead of local ones. |
phone_number |
string | none | A specific number from GET /search-phone-numbers. Without it, the first search result is bought. |
nickname |
string | none | Label shown in the dashboard. |
inbound_agents |
AgentWeight[] |
[] |
Agents that answer, with weights. See A/B testing. |
outbound_agents |
AgentWeight[] |
[] |
Agents used when this number places calls. |
inbound_webhook_url |
URL | none | Called before each inbound call. See Inbound call webhook. |
fallback_number |
E.164 string | none | Where inbound calls go when no concurrency slot frees up. |
allowed_inbound_country_list |
string[] | none (all) | Caller countries that may reach the agent. |
allowed_outbound_country_list |
string[] | none (all) | Destination countries this number may dial. |
cps_limit |
number, 0.1 to 150 | carrier default | Outbound calls per second for this number. |
AgentWeight is { agent_id: string, agent_version?: integer, weight: number } with weight greater than 0 and at most 1.
Search before you buy#
GET /search-phone-numbers lists numbers you can buy, with the monthly price. Pick one and pass it as phone_number to POST /create-phone-number.
| Query parameter | Type | Default | Description |
|---|---|---|---|
country_code |
string | AU |
ISO country code. |
number_provider |
telnyx | twilio |
telnyx |
Provider to search. |
area_code |
integer | none | Area code filter. |
toll_free |
boolean | false |
Toll-free numbers only. |
contains |
string, up to 10 chars | none | Digits the number must contain. |
limit |
integer, 1 to 20 | 5 |
Number of results. |
[
{
"phone_number": "+61255501234",
"country_code": "AU",
"toll_free": false,
"monthly_price": 8,
"features": ["voice", "sms"]
}
]Telnyx results use the carrier's monthly_cost when it returns one. Otherwise, and for Twilio, the price comes from the Tried price list below.
Number types#
| Type | How to request it | Example (mock mode) |
|---|---|---|
| AU local | country_code: "AU", optional area_code (mock default 2) |
+61 2 5550 1234 |
| AU toll-free (1800) | country_code: "AU", toll_free: true |
+61 1800 555 123 |
| Other countries | any ISO code, for example "NZ" or "GB". See International calling |
+44 555 ... |
In mock mode (no TELNYX_API_KEY, or no TWILIO_ACCOUNT_SID for Twilio) the API returns fake numbers in the formats above and records the purchase in the provider operation log. With keys, Telnyx orders through POST /v2/number_orders and Twilio through IncomingPhoneNumbers.
What happens after a purchase#
- The number is stored with
provider(telnyxortwilio),country_codeandprovisioning_status: "pending". - Telnyx: on the first purchase Tried creates an outbound voice profile and an FQDN connection that points at your LiveKit SIP host (unless
TELNYX_CONNECTION_IDis set), then assigns the number to it. See Telnyx. - Twilio: Tried creates one Elastic SIP trunk per workspace on the platform Twilio account, with an origination URL pointing at LiveKit SIP, and attaches the number.
- LiveKit inbound and outbound trunks and a dispatch rule are created for the number.
provisioning_statusbecomesprovisioned, orerrorwithprovisioning_errorset.POST /provision-phone-number/:nretries.
Release a number#
In the dashboard, open the number, click the ... menu and Delete number. With the API, call DELETE /delete-phone-number/:n. Tried deletes the LiveKit trunks and dispatch rule and, for bought Telnyx and Twilio numbers, releases the number back to the carrier. An imported number is only removed from Tried; it stays on your carrier account.
Limits and gotchas#
- Buying needs a business profile when
TRIED_KYC_REQUIRED=1. UntilPOST /kycis approved,POST /create-phone-numberreturns 403. - Many countries (Australia included) require a regulatory bundle with an address and identity documents before a carrier sells you a number. Create it in the Telnyx or Twilio portal first. A refused order returns HTTP 422 with the carrier's message.
fallback_numbermust be E.164, otherwise the API returns 400.- A number can belong to only one workspace. Buying or importing a number that already exists returns 409.
- The dashboard does not have a buy dialog. Buying runs through the API.