Trunks and Gateways
10 min read
A Trunk (also called a Gateway) is your connection to a telephone carrier (an "ITSP," or Internet Telephony Service Provider) for sending and receiving outside phone calls. Without at least one working trunk, your system can only make internal calls between extensions — it cannot reach the public phone network, and the public phone network cannot reach you.
UCBC gives you two related places to manage this:
- Trunk ITSP — the main, carrier-facing management screen. Use this for your organization's shared carrier connections, the phone numbers that ride on them, and per-customer call limits.
- Gateways — a general-purpose list of custom SIP connections. Carrier trunks created on the Trunk ITSP screen are hidden from this list on purpose (they're managed only from Trunk ITSP), so anything you see on the Gateways screen is a connection someone created by hand for a specific purpose.
This article covers both.
Overview#
Trunk ITSP is organized into tabs:
- Trunk — the list of your carrier trunks (connections to your telephone providers), with a Channels (CC) sub-tab for setting per-customer call limits.
- DID/DOD — the phone numbers associated with your trunks: inbound numbers customers can be reached at, and outbound routing/caller-ID rules.
- IP Permissions — extra trusted IP addresses for carriers that send traffic from more than one address.
A Gateway (on the plain Gateways screen) is the same underlying idea — a SIP connection to some other system — but created and managed individually, outside the Trunk ITSP workflow.
The Gateways list
Screenshot needed · gateways-listHow to Create a Gateway (Gateways screen)#
- Go to Gateways and click Add.
- Fill in the required fields:
- Gateway — a name to identify this connection.
- Proxy — the hostname or IP address (and optionally port) of the other side, in the form
host:port. - Register — set to True if this connection must log in with a username and password; set to False if the other side trusts your server's IP address directly (no login).
- If Register is True, also enter Username and Password.
- Expire Seconds and Retry Seconds — how long a registration lasts before renewing, and how long to wait before retrying a failed connection.
- Click Advanced to reveal optional fields if you need them (see Field Reference below) — most connections never need these.
- Set Context and Profile (leave at their defaults unless you have a specific reason to change them) and make sure Enabled is True.
- Click Save.
How to Create an ITSP Trunk (Trunk ITSP screen)#
- Go to Trunk ITSP (defaults to the Trunk tab) and click Add.
- Enter a Trunk Name.
- Enter the Proxy — your carrier's SIP hostname or IP address, e.g.
sip.my-carrier.com. - Set Register:
- True — your carrier requires you to log in with a username/password. Enter Username, Password, and optionally Auth Username and Realm.
- False — your carrier authenticates you by IP address instead (no login). This is the most common setup for business-grade carrier trunks.
- Optionally set Channels (maximum simultaneous calls this trunk itself allows) and Codec Preferences (e.g.
PCMA,PCMU,G722). - Optionally add PSTN Number Manipulation rows if your carrier needs dialed numbers reformatted (see Tips below).
- Make sure Enabled is True, then click Save.
An ITSP trunk's DID/DOD tab
Screenshot needed · trunk-did-dodDID/DOD Tab — Phone Numbers#
This tab manages two kinds of numbers:
- Inbound (DID) — a real phone number your carrier gave you, which rings into a specific customer.
- Outbound (DOD) — a rule that decides which trunk an outbound call goes out on, based on the number being dialed.
How to add an inbound DID#
- Go to Trunk ITSP > DID/DOD and click Add.
- Set Direction to Inbound.
- Enter the DID Number. You can enter a single number, a comma-separated list, or a range (e.g.
+15551230000-+15551230010) — every number in it becomes its own entry. A live counter shows how many numbers you just entered. - Choose the ITSP Trunk this number arrives on.
- Choose the Assigned Domain — the customer this number belongs to. Leave unassigned until a customer needs it.
- Save.
How to add an outbound routing rule (DOD)#
- Click Add, set Direction to Outbound.
- Enter a Destination Pattern (a regex matching dialed numbers, e.g.
^1800) or, optionally, a Source Pattern to also require a specific caller. - Choose the ITSP Trunk this rule should send matching calls out on.
- If this should be the catch-all used whenever a dialed number doesn't match any more specific rule, set Default Route to True (only one default route can be enabled at a time, and it applies platform-wide).
- Save.
What is a "Default Route"? If you only have one carrier trunk, you don't need per-number outbound rules — just mark one outbound entry as the Default Route, and every outbound call that doesn't match a more specific pattern will use it automatically.
IP Permissions Tab#
Some carriers send signaling traffic from more than one IP address (for example, a backup or secondary address). Each trunk's own Proxy address is already trusted automatically — use this tab only to add extra trusted addresses.
- Go to Trunk ITSP > IP Permissions, click Add.
- Enter the carrier's IP Address / CIDR (e.g.
102.22.20.162or102.22.20.0/24). - Add a Description and save.
Channels (CC) Tab — Per-Customer Call Limits#
This tab controls how many simultaneous outbound calls one customer (domain) is allowed to place out through your shared carrier trunk at the same time.
How to set a channel limit#
- Go to Trunk ITSP > Trunk, then open the Channels sub-tab.
- Choose the Domain (the customer) from the dropdown.
- Choose the Main Trunk (the shared carrier trunk) — if only one exists, it's selected automatically.
- The system looks for an outbound route this domain already has pointing at that trunk:
- If no route is found, you'll see a message that a channel limit can only be set on an existing outbound route — create one first on the Outbound Routes page, then come back here.
- If a route is found, its name is shown and you can set the limit directly.
- Enter the Channels value — the maximum number of simultaneous outbound calls this customer may place through this trunk. Leave at 0 for unlimited.
- Click Save.
What happens when the limit is reached: once a customer has that many outbound calls active at the same time on this trunk, any additional outbound call attempt is rejected as busy, exactly as if the line were engaged. It does not affect inbound calls or calls on other trunks.
How to Edit a Trunk/Gateway#
- Gateways screen: click a row to open it, change any field, and save.
- Trunk ITSP > Trunk tab: click a trunk to edit its connection details, or use the row's action links to toggle Enabled, toggle Register, or Retry a connection that isn't currently registered.
How to Delete a Trunk/Gateway#
- Gateways screen: select the row's checkbox and click Delete. A trunk created through Trunk ITSP cannot be deleted here — it shows a lock icon instead of a checkbox and must be removed from the Trunk ITSP screen.
- Trunk ITSP > Trunk tab: select the trunk and click Delete.
- DID/DOD tab: select one or more numbers/rules and click Delete.
- IP Permissions tab: select the entry and click Delete.
Field Reference#
Gateway (Gateways screen)#
| Field | Description |
|---|---|
| Gateway | Name identifying this connection. |
| Username / Password | Login credentials — only needed if Register is True. |
| Proxy | Hostname or IP address (and port) of the other side. |
| Register | True: this connection logs in with a password. False: trusted by IP address only. |
| Expire Seconds | How long a registration lasts before it must renew. |
| Retry Seconds | How long to wait before retrying after a failed connection. |
| Auth Username / Realm | Advanced authentication identity fields some carriers require. |
| Channels | Maximum simultaneous calls on this connection (0 = unlimited). |
| Codec Preferences | Preferred audio codecs, e.g. PCMA,PCMU,G722. |
| Context / Profile | Internal routing/technical settings — leave at default unless instructed otherwise. |
| Enabled | Turns the connection on or off. |
| Description | Free-text notes. |
ITSP Trunk#
| Field | Description |
|---|---|
| Trunk Name | Name identifying this carrier trunk. |
| Proxy | Carrier's SIP hostname or IP address. |
| Register | True: logs in with Username/Password. False: carrier trusts your IP address. |
| Username / Password | Only used when Register is True. |
| Auth Username / Realm | Optional authentication identity fields. |
| Channels | Maximum simultaneous calls on this trunk overall. |
| Codec Preferences | Preferred audio codecs list. |
| PSTN Number Manipulation | Strip/Prepend rules to reformat dialed numbers for this carrier (applies only to this trunk's own DID/DOD routing). |
| Enabled | Turns the trunk on or off. |
DID/DOD Entry#
| Field | Description |
|---|---|
| Direction | Inbound (a real number) or Outbound (a routing rule). |
| DID Number (inbound) | The phone number provided by the carrier — single, list, or range. |
| Destination Pattern (outbound) | A number pattern that routes matching calls via this trunk. |
| Source Pattern (outbound) | Optional — also requires the caller's number to match. |
| ITSP Trunk | Which carrier trunk this entry belongs to. |
| Assigned Domain (inbound only) | Which customer this number is assigned to. |
| Default Route (outbound only) | Catch-all rule used when no more specific pattern matches. Only one may be active at a time. |
| Enabled | Turns the entry on or off. |
IP Permission Entry#
| Field | Description |
|---|---|
| IP Address / CIDR | The carrier's additional trusted address or network. |
| Enabled | Turns the entry on or off. |
| Description | Free-text notes. |
Channel Limit (CC tab)#
| Field | Description |
|---|---|
| Domain | The customer this limit applies to. |
| Main Trunk | The shared carrier trunk the limit applies to. |
| Channels | Maximum simultaneous outbound calls this customer may place through the trunk. 0 = unlimited. Calls beyond this limit are rejected as busy. |
Tips & Common Issues#
- A trunk shows "Stopped" but should be working: check that it's Enabled, and if it registers, check the registration status; if it's IP-authenticated, confirm the carrier's address matches the Proxy field (or is listed under IP Permissions).
- Channel limit field is missing / says "No outbound route found": you must create an Outbound Route for that customer to the trunk first (on the Outbound Routes page); the Channels tab only edits the limit on an existing route, it does not create one.
- Only one Default Route allowed: if you need to switch which outbound rule is the catch-all, disable or un-default the old one first.
- A carrier uses more than one signaling IP: add the extra address(es) under IP Permissions — you do not need to change the trunk's own Proxy field.
- Can't delete a trunk from the Gateways screen: trunks created through Trunk ITSP are locked there on purpose — delete them from Trunk ITSP > Trunk instead.