What a SIP trunk does
A Voice AI SIP trunk connects your PBX to Thread directly over SIP. Each trunk has two sides, and you can set up either one or both:Where to find it
Go to Voice AI > SIP Trunks & Caller ID in the admin app and select Add SIP Trunk, or open an existing trunk to edit it. Nothing is saved until you select Save on the trunk page.Add a SIP trunk
Name the trunk and pick its country
- Internal name: a label your customers never see.
- Country: only Voice AI agents with a number in this country can be linked to the trunk. The country can’t be changed after the trunk is created.
Set up the inbound side (optional)
- Point your phone system to Thread. Copy Thread’s SIP address. Your PBX sends calls to it over TLS on port
5061, or over UDP or TCP on port5060. Thread’s SIP address uses a wildcard certificate (*.sip.livekit.cloud), so a PBX that only accepts an exact-match certificate, such as 3CX, has to use port5060. Set Media encryption to Required whenever your PBX supports SRTP: Thread then accepts only calls whose audio is encrypted. Allowed accepts encrypted and unencrypted audio, and Disabled accepts only unencrypted audio. Turn SRTP on in your PBX to match. - Restrict who can call. Choose how Thread recognizes your PBX:
- Allowed addresses: Thread accepts calls only from the IP addresses or CIDR blocks you list, one per line. Leave the list empty to accept calls from any address. Anyone who knows Thread’s SIP address and your agent’s number can then call it with any caller number, so list your PBX’s addresses when you can.
- Username and password: your PBX answers a challenge on every call. Use this when your PBX is hosted and shares its IP address with other customers. These credentials are separate from any you set on the outbound side.
- Test connection (optional). Select Start listening and call the SIP address Thread shows from your PBX. Each call Thread accepts appears with its caller, number and headers, which confirms your address or credentials and media encryption work. Thread ends test calls right away, so your PBX may log them as busy. Thread only sees calls it accepts: if nothing appears, check the allowed addresses or credentials, that your PBX sends to port
5060, and that a rule routes the test number to the Thread trunk.

Choose how Thread recognizes your PBX

A call Thread accepted during an inbound test
Via, Contact, Authorization or Session-Expires.Select Save to return to the trunk page.Set up the outbound side (optional)
- Trunk identity. Pick the transport your PBX accepts and enter your PBX’s address. TLS+SRTP is recommended: it encrypts the call setup and the audio, and your PBX must accept SRTP. TLS encrypts the call setup only. Both default to port
5061; TCP and UDP encrypt neither and default to5060. Leave the port blank to use the default. - Add Thread’s SIP IPs to your allow list. Add all three IP ranges shown to your PBX’s allow list. Use the copy button next to each one.
- Username and password (optional). Enter them only if your PBX requires digest authentication for incoming calls.
- Install our TLS certificate. Shown for TLS only. Import the CA chain into your PBX’s trusted CA store so it accepts Thread’s TLS handshake. The certificate is the same for every trunk.
- Test connection. Enter a DID that your PBX routes to a person, then select Test connection. Thread places a call through the trunk and hangs up as soon as your PBX responds. When it succeeds, select Complete. If your PBX only accepts calls to numbers it recognizes, as 3CX does, testing against a DID it doesn’t know reports a failure even when the trunk is fine.
X- prefix) and pick a value: caller phone, contact name, contact company, contact match type, PSA contact ID, PSA contact company ID, PSA ticket number, call reason or correlation ID. P-Asserted-Identity is added and locked by Thread; it carries the caller’s number in the form PBXs such as 3CX accept.Select Save to return to the trunk page.Link agents
Save the trunk

Both sides of one SIP trunk
What changes when an inbound side goes live
When a trunk has only one side, the agent uses Thread’s default path for the other direction:- Inbound only: callers arrive over SIP, and transfers dial the agent’s transfer number over regular phone lines.
- Outbound only: callers dial the agent’s Thread number as usual, and transfers go to your PBX over SIP.
Add inbound to a trunk you already use
If a trunk already carries transfers to your PBX, open it, select Set up trunk under Inbound trunk, and complete the inbound steps above. Your outbound settings, custom headers and linked agents stay as they are. Point your PBX at Thread’s SIP address and route the agents’ numbers to it before you turn inbound on. The switch on the Inbound trunk card starts off, because the agents are so far linked only to the outbound side; turn it on and select Save on the trunk page, and the linked agents start using the inbound side. For 3CX, follow Add inbound to your existing Thread-3CX SIP trunk.Edit, pause and delete trunks
A side carries calls while its switch is on and at least one agent is linked to the trunk.- Edit: open the trunk from the list, select Edit settings on a side, and save the trunk page when you’re done.
- Turn one side off: switch it off on the trunk page and select Save. Its settings stay, so you can switch it back on later. Turning inbound off returns the agents’ numbers to Thread’s regular phone lines; turning outbound off sends their transfers over the default path. One side stays on while agents are linked.
- Pause the trunk: from the trunk’s menu in the list, select Disconnect all agents. The trunk keeps its settings and carries no calls until you link an agent again.
- Delete: from the trunk’s menu in the list, select Delete trunk. Its agents are disconnected first and go back to Thread’s default path.
Frequently asked questions
Do I need a SIP trunk to use Voice AI?
Do I need a SIP trunk to use Voice AI?
Which PBXs are supported?
Which PBXs are supported?
Can one trunk serve multiple countries?
Can one trunk serve multiple countries?
Should my PBX register with Thread?
Should my PBX register with Thread?
Can I turn off one side of a trunk?
Can I turn off one side of a trunk?