How to Connect SIP Trunks to External Carriers
SIP Trunks allow you to connect your PBX.IM system to external SIP carriers, Internet Telephony Service Providers (ITSPs), or other PBX systems. A SIP trunk defines the connection settings for both inbound calls (received from the carrier) and outbound calls (sent to the carrier), including IP authentication, transport protocol, number translation rules, and optional authentication credentials.
Table of Contents
- Access SIP Trunks
- SIP Trunks Overview Table
- General Settings
- Inbound Trunk Settings
- Outbound Trunk Settings
- Number Translation Rules
- Testing Rules
- Available SBC Regions
- Common Use Cases
Access SIP Trunks
Log into PBX.IM Dashboard, go to Call Routing, and select SIP Trunks from the dropdown menu.
SIP Trunks Overview Table
The main SIP Trunks page displays all configured trunks in a searchable table with the following columns:
| Column | Description |
|---|---|
| Name | The descriptive name assigned to the trunk. |
| Description | Optional text describing the trunk's purpose. |
| Labels | Tags used for organizing and filtering trunks. |
| Active | Shows whether the trunk is currently enabled or disabled. |
| Host ACL | Displays the IP addresses authorized for inbound connections. If multiple IPs are configured, hover to see the full list. |
| Destination Host | The remote SIP host/IP address used for outbound calls. |
| Keep Alive | Indicates whether periodic SIP keep-alive requests are enabled for the trunk. |
Click any row to open the trunk editor. Use the Add SIP Trunk button to create a new trunk.
General Settings
The General tab contains core trunk identification fields.
| Field | How to use it |
|---|---|
| Active | Toggle to enable or disable this trunk. A disabled trunk will not process calls. |
| Name | Enter a unique, descriptive name for the trunk (e.g., "Main Carrier" or "Backup ITSP"). Required field. |
| Description | Optional free-text field to describe the trunk's purpose or associated carrier. |
| Labels | Assign labels for easier organization and filtering of trunks. Select from existing labels or create new ones. |
Inbound Trunk Settings
The Inbound Trunk tab controls how calls arriving from an external carrier are handled.
| Field | How to use it |
|---|---|
| IP Authentication Host / ACL | Define which IP addresses are allowed to send calls to this trunk. Add up to 5 IP entries. Each entry can be a single IPv4 address or an IP range. Duplicate IPs are not allowed. |
| Allow Outbound Calls | Toggle to permit the trunk to also relay outbound calls. When disabled, the trunk is inbound-only. |
| Customer Domain (SIP URI) | Displays your assigned SIP domain. This is the URI your carrier should point inbound calls to. Read-only. |
| Dialed (DNID) Rules | Number translation rules applied to the dialed number (DNID) of incoming calls. See the Number Translation Rules section below. |
Supported transport types for inbound connections are UDP, TCP, and TLS. Make sure your carrier's IP addresses are added to the Host ACL or inbound calls will be rejected.
Outbound Trunk Settings
The Outbound Trunk tab defines how calls are sent to the external carrier.
| Field | How to use it |
|---|---|
| Destination Host / URL | The IP address or hostname of the remote SIP server. This is where outbound calls will be routed. Required field. Must be a valid IPv4 address or hostname. |
| Transport | Select the SIP transport protocol: UDP (port 5060), TCP (port 5060), or TLS (port 5061). The port updates automatically when you change the transport type. |
| Port | The port number for the remote SIP server. Defaults based on transport type but can be manually changed (valid range: 1--65535). |
| Require Authentication | Toggle to enable SIP digest authentication for outbound requests. When enabled, Username and Password fields appear. |
| Username | SIP authentication username. Minimum 6 characters, maximum 40. Only visible when Require Authentication is enabled. |
| Password | SIP authentication password. Minimum 6 characters. Use the generate button to create a random secure password, the eye icon to reveal it, or the copy button to copy it to clipboard. Only visible when Require Authentication is enabled. |
| Keep Alive | Toggle to send periodic SIP keep-alive (OPTIONS) requests every 60 seconds to ensure the trunk stays active and the remote side is responding. |
| Caller ID Rules | Number translation rules applied to the outbound Caller ID. See the Number Translation Rules section below. |
| Dialed Rules | Number translation rules applied to the outbound dialed number. See the Number Translation Rules section below. |
Number Translation Rules
Number translation rules allow you to modify phone numbers as they pass through the trunk. Rules are available on both the Inbound and Outbound tabs and are applied from top to bottom in sequence. You can drag rules to reorder them. A maximum of 15 rules can be added per rule set.
Each rule consists of:
| Field | How to use it |
|---|---|
| Prefix (Action) | The action to perform: Add (prepend or append digits), Remove (strip matching digits), or Replace (substitute matching digits with new ones). |
| Condition | How to match the number: Starts with, Equals, or Ends with. |
| Match Value | The digit pattern to match against. Required for Remove and Replace actions. |
| Replace / Insert | The digits to insert (for Add) or substitute (for Replace). Required for Add and Replace actions. |
How rules work:
- Add: Inserts digits before or after the matched portion. For example, adding "44" with condition "Starts with" prepends "44" to the number.
- Remove: Strips the matched digits from the number. For example, removing "0" with condition "Starts with" removes a leading zero.
- Replace: Substitutes the matched portion with new digits. For example, replacing "00" with "+" when condition is "Starts with" converts "0044..." to "+44...".
Testing Rules
Each rule section includes a test input where you can enter a sample phone number to preview how the configured rules will transform it. The result is displayed in real time as you type.
This is useful for verifying that your number translation rules produce the expected output before saving the trunk.
Available SBC Regions
PBX.IM offers Session Border Controllers (SBCs) in multiple regions. The Outbound Trunk tab displays the available SBC regions and their IP addresses:
| Region | Location |
|---|---|
| USA | US East/West |
| Europe | Frankfurt, London |
| Middle East | Dubai |
| EMEA | Various |
| APAC | Singapore, Sydney |
Use the SBC IP closest to your carrier's infrastructure for optimal call quality and lowest latency.
Common SIP Trunk Use Cases
Connecting to an ITSP for outbound calling -- Configure the Outbound Trunk tab with your ITSP's SIP server address, select the appropriate transport protocol, and enter the authentication credentials provided by your carrier. Add Caller ID rules if your ITSP requires a specific number format.
Receiving inbound calls from a carrier -- Add the carrier's SIP server IP addresses to the Inbound Host ACL. Configure Dialed (DNID) rules to strip or modify the incoming number format to match your internal extension numbering plan.
Failover with multiple trunks -- Create two SIP trunks pointing to different carriers. If the primary trunk goes down (detected via Keep Alive), route outbound calls through the backup trunk using dial rules or outbound route configuration.
Number format normalization -- Use translation rules to convert between international and local number formats. For example, remove a leading "0" and add the country code "+44" so all numbers are stored and displayed in E.164 format.
Connecting two PBX systems -- Set up a SIP trunk between two PBX.IM accounts or between PBX.IM and an on-premise PBX. Configure IP ACLs on both sides and use translation rules to ensure the numbering plans are compatible.