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

  1. Access SIP Trunks
  2. SIP Trunks Overview Table
  3. General Settings
  4. Inbound Trunk Settings
  5. Outbound Trunk Settings
  6. Number Translation Rules
  7. Testing Rules
  8. Available SBC Regions
  9. 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:

ColumnDescription
NameThe descriptive name assigned to the trunk.
DescriptionOptional text describing the trunk's purpose.
LabelsTags used for organizing and filtering trunks.
ActiveShows whether the trunk is currently enabled or disabled.
Host ACLDisplays the IP addresses authorized for inbound connections. If multiple IPs are configured, hover to see the full list.
Destination HostThe remote SIP host/IP address used for outbound calls.
Keep AliveIndicates 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.

FieldHow to use it
ActiveToggle to enable or disable this trunk. A disabled trunk will not process calls.
NameEnter a unique, descriptive name for the trunk (e.g., "Main Carrier" or "Backup ITSP"). Required field.
DescriptionOptional free-text field to describe the trunk's purpose or associated carrier.
LabelsAssign 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.

FieldHow to use it
IP Authentication Host / ACLDefine 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 CallsToggle 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) RulesNumber 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.

FieldHow to use it
Destination Host / URLThe 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.
TransportSelect the SIP transport protocol: UDP (port 5060), TCP (port 5060), or TLS (port 5061). The port updates automatically when you change the transport type.
PortThe port number for the remote SIP server. Defaults based on transport type but can be manually changed (valid range: 1--65535).
Require AuthenticationToggle to enable SIP digest authentication for outbound requests. When enabled, Username and Password fields appear.
UsernameSIP authentication username. Minimum 6 characters, maximum 40. Only visible when Require Authentication is enabled.
PasswordSIP 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 AliveToggle 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 RulesNumber translation rules applied to the outbound Caller ID. See the Number Translation Rules section below.
Dialed RulesNumber 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:

FieldHow 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).
ConditionHow to match the number: Starts with, Equals, or Ends with.
Match ValueThe digit pattern to match against. Required for Remove and Replace actions.
Replace / InsertThe 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:

RegionLocation
USAUS East/West
EuropeFrankfurt, London
Middle EastDubai
EMEAVarious
APACSingapore, 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.