Connect a SIP Trunk
A SIP trunk connects SessionPBX to a telephone carrier. You need one when users must receive calls on public phone numbers or dial numbers outside the workspace.
SessionTalk uses a bring-your-own-carrier model. Your carrier supplies the SIP service, phone numbers and call charges; SessionTalk supplies the hosted phone-system features.
Information to obtain from your carrier
- Carrier or proxy hostname
- SIP port and transport: UDP, TCP or TLS
- Whether the trunk uses source-IP authentication or a username and password
- Authentication username, password and realm when credentials are required
- From-domain value, if different from the carrier host
- Carrier signalling IP addresses or CIDR ranges
- Inbound phone numbers
- An authorised default outbound caller ID
Ask the carrier to confirm how it expects international numbers to be formatted and which SessionTalk regional service address it should send calls to.
Add the trunk
Adding a trunk is a short wizard. Each step is checked before you move on, so a mistake is caught where it was made.
- Open the SessionPBX project.
- Select Call Routing.
- On SIP trunks, select Add trunk.
Provider — name the trunk and choose your carrier. Picking a carrier fills in the settings we know for it and tells you what you still need to supply. Twilio, Telnyx, SignalWire and Plivo can also read your account and fill in your phone numbers; see Carrier Guides. Choose Other / not listed for a carrier with no template.
Connection — the carrier host, port and transport, and whether the trunk carries calls in both directions or only one.
Authentication — how the carrier recognises you.
Inbound — the numbers this trunk brings in, and whether to refuse calls for numbers not listed.
Outbound — the caller ID to present, which calls leave this way, and any additional gateways.
IP authentication
Use IP authentication when the carrier recognises the source and destination IP addresses without a SIP password. Enter every signalling source that the carrier may use under Carrier IP addresses, one IP address or CIDR range per line.
These are the carrier’s addresses, not your own. Only add ranges the carrier has confirmed: broad allowlists increase exposure to unwanted traffic and toll fraud.
Credential authentication
Use credential authentication when the carrier requires a password on outbound calls. Enter the Username and Password. Leave Auth realm or From domain blank unless the carrier gave you specific values.
When editing an existing credential trunk, leave the password blank to keep the stored secret. Enter a value only when rotating it.
Registration
Turn on Register to this carrier when the carrier expects the phone system to sign in rather than recognising its address. Most UK and European providers work this way. See Registration-based Carriers.
Add numbers and caller ID
Enter inbound numbers one per line under Inbound numbers. Use full international format where the carrier supports it, for example +442071234567.
Set Caller ID to a number that belongs to this carrier account. Individual members can later be assigned another number from the same workspace.
If the carrier screens your caller ID and reads it from P-Asserted-Identity rather than From, set Assert caller ID in accordingly. From is always sent either way, so leave this alone unless the carrier asked for it.
More than one carrier, or more than one gateway
A workspace can have several trunks. Use Outbound number rules to say which calls leave by which trunk, one rule per line as a dialling prefix and an optional priority. The longest matching prefix wins. A trunk with no rules carries every outbound call.
If a single carrier gave you several hosts for resiliency, add the extras under Additional gateways rather than creating a second trunk. Calls try them in priority order, and share between gateways at the same priority.
Enable and test the trunk
After saving, make sure the trunk’s Enabled switch is on. Test in this order:
- Call an inbound number from an outside phone.
- Confirm the expected SessionCloud extensions ring.
- Enable Outbound PSTN for one test member.
- Call a permitted public destination.
- Confirm two-way audio and the presented caller ID.
If inbound signalling does not arrive, verify the carrier destination, allowed source IPs, port and transport. If a call connects with one-way audio, collect the time, calling number, called number and affected networks before contacting support.
Edit, disable or delete a trunk
- Edit a trunk to change its carrier details, numbers or credentials.
- Switch Enabled off to stop using it without deleting its configuration.
- Delete it only when its numbers and routes are no longer required.
Deleting a trunk also removes its inbound-number routing from SessionPBX.
Carrier guides
Step-by-step guides for the carriers we have templates for:
- Twilio
- Telnyx
- SignalWire
- Plivo
- Gamma (UK)
- Voiceflex (UK)
- Andrews & Arnold (UK)
- Registration-based carriers
- Any other carrier
Continue with routing phone numbers and enabling outbound calls.