Trunks
Trunks let you connect your FlyNumber phone system to external VoIP providers for both incoming and outgoing calls. This gives you control over call routing, which providers handle your calls, and how caller information is displayed.
The Trunks menu isn't shown on a new phone system. Contact FlyNumber support and we'll have it switched on for your account β activation happens on our side, so allow a little time. Once it's live, Trunks appears in the main menu with the three tabs described below.
Quick Startβ
Most users need trunks for one of these scenarios. Jump to the one that fits your needs:
I want to route all outbound calls through my own VoIP provider
Steps:
- Go to Trunks > Termination Gateways and click +
- Enter your provider's details (host, username, password, port)
- Save the gateway
- Go to Trunks > Termination Routes and click +
- Create a route with:
- Name: "All Outbound"
- SRC Prefix: Leave empty
- DST Prefix: Leave empty
- Gateway: Select your new gateway
- Save and test with a call
This catch-all route sends all outbound calls through your provider.
I want to route calls to specific countries through a different provider
Steps:
- Create your termination gateway (if not already done)
- Go to Trunks > Termination Routes and click +
- Create a route with:
- Name: "UK Calls" (or relevant country)
- SRC Prefix: Leave empty
- DST Prefix: "+44" (UK country code, adjust as needed)
- Gateway: Select your gateway
- Save and test with a call to that country
Calls to numbers starting with +44 will use your gateway; others use the default.
I want to receive calls from another VoIP provider on my FlyNumber system
Steps:
- Go to Trunks > Inbound Trunks. A trunk named Default already exists; open it with Actions β Edit, or click + to create another
- Copy the auto-generated Domain shown at the top of the General section (use the copy icon)
- Add the external provider's number under Numbers > Phone Numbers so the phone system recognises calls to it
- Configure your external provider to send calls to
<number in E.164>@<trunk domain> - If your provider requires registration, enable it and enter credentials
- Test by calling the number
Your FlyNumber system will receive calls sent to the trunk's domain.
Overviewβ

The Trunks interface has three sections:
| Section | Purpose |
|---|---|
| Inbound Trunks | Receive calls from external VoIP providers |
| Termination Gateways | Define connections to outbound VoIP providers |
| Termination Routes | Control which gateway handles which outbound calls |
Why Use Custom Trunks?
- Cost Control: Route calls through cheaper providers for specific destinations
- Provider Flexibility: Use multiple VoIP providers at once
- Number Portability: Keep numbers with other providers while using FlyNumber features
- Redundancy: Set up backup call paths
- Custom Routing: Route based on caller ID, destination, or both
Inbound Trunksβ
Inbound trunks let you receive calls from external VoIP providers. Useful when you have phone numbers with other providers that you want to route through your FlyNumber system.

Creating an Inbound Trunkβ
- Navigate to Trunks > Inbound Trunks
- Click the + button
- Configure settings:
| Setting | Description |
|---|---|
| Domain | Auto-generated β copy it with the icon next to the field and give it to your provider. New trunks include the region you pick (see POP) in the domain |
| Friendly Name | Name shown in the list (e.g., "External Provider Trunk") |
| Transport Protocol | UDP, TCP or TLS |
| POP | Which of the two points of presence handles the trunk's calls: FRA (Frankfurt, default) or NYC (New York). Changing it changes the domain, so update your provider afterwards |
| Lookup destination by | How the called number is read from the incoming call: R-URI username part (typical) or To header username part |
| Allowed Codecs | OPUS, G722, PCMU, PCMA, G729, GSM, telephone-event β drag to set priority (left-most first). Keep telephone-event so key presses reach voice menus and feature codes |
Numbers that reach you through an inbound trunk must also be added under Numbers > Phone Numbers β otherwise the phone system can't match the incoming call to a Phone Number module.
Registration (If Required)β
Some providers require your trunk to register with them (registration is off by default):
- Toggle Registration to ON
- Enter:
- Domain: Your provider's SIP registrar
- Port: Usually 5060 β leave empty to use the provider's SRV or A record
- Username and Password: From your provider
- Contact User: Optional value for the Contact header
CLI Rulesβ

Modify caller information as calls arrive:
- SRC number rule: a ready-made choice to Remove + or Add + on the caller's number
- SRC Name Rewrite Rule / Result: change caller names (e.g., add an "External: " prefix)
- DST Rewrite Rule / Result: reformat the called number (e.g., strip country codes)
The rewrite rules use POSIX Regular Expressions. See Understanding Regular Expressions below.
Termination Gatewaysβ
Termination gateways connect your system to external providers for outbound calls.
A FlyNumber-managed gateway is already there and carries your outbound calls by default; it shows a padlock and can't be edited or deleted. Add a gateway only when you want a third-party provider or custom routing.

Creating a Termination Gatewayβ
- Navigate to Trunks > Termination Gateways
- Click the + button
- Configure settings:

| Setting | Description | Example |
|---|---|---|
| Name | Friendly name | "Main Provider" |
| Network Protocol | IPv4 Only (usual), IPv6 Only, Dualstack, IPv4 Preferred or IPv6 Preferred | IPv4 Only |
| Transport Protocol | UDP, TCP or TLS | UDP |
| Username | Auth username from provider | your_username |
| Password | Auth password from provider | β’β’β’β’β’β’β’ |
| Host | Provider's SIP server | sip.provider.com |
| Port | Connection port (5060 if left empty) | 5060 (UDP/TCP) or 5061 (TLS) |
| Allowed Codecs | OPUS, G722, PCMU, PCMA, G729, GSM, telephone-event β drag to set priority | OPUS, G722, PCMU |
- OPUS: Highest quality, more bandwidth
- G722: HD voice quality
- PCMU/PCMA: Standard quality, widely supported
- G729: Lower bandwidth, slightly lower quality
- Always include telephone-event for DTMF tones
CLI Rules for Gatewaysβ
| Rule | Purpose |
|---|---|
| SRC Rewrite | Modify outbound caller ID |
| DST Rewrite | Reformat destination number |
Useful for adding/removing country codes or presenting specific caller IDs.
Termination Routesβ
Routes determine which gateway handles each outbound call based on number patterns.
Creating a gateway isn't enoughβyou must also create routes that tell the system when to use it. Without routes, calls use the default gateway.
Creating a Termination Routeβ
- Navigate to Trunks > Termination Routes
- Click the + button
- Configure settings:

| Setting | Description |
|---|---|
| Name | Friendly name (e.g., "International Calls") |
| SRC Prefix | Match calls FROM numbers starting with this (optional) |
| DST Prefix | Match calls TO numbers starting with this (optional) |
| Gateway | Which gateway to use |
Route Priorityβ
When several routes could match a call, the one whose prefixes match most closely wins β a longer prefix beats a shorter one (+44207 beats +44, which beats an empty prefix). An empty SRC or DST prefix means "any". If no custom route matches, the call uses the FlyNumber-managed default gateway.
Common Route Configurationsβ
Route all calls through custom gateway:
- SRC Prefix: (empty)
- DST Prefix: (empty)
- Gateway: Your custom gateway
Route UK calls through custom gateway:
- SRC Prefix: (empty)
- DST Prefix: +44
- Gateway: Your UK provider
Route calls from specific DID:
- SRC Prefix: +15551234567
- DST Prefix: (empty)
- Gateway: Your custom gateway
Troubleshootingβ
| Problem | Likely Cause | Solution |
|---|---|---|
| Inbound calls never arrive | Number not added under Numbers > Phone Numbers, or provider sending to an old domain after a POP change | Add the number; re-copy the trunk domain and update the provider |
| Calls don't connect | Wrong gateway credentials | Verify username/password with provider |
| Registration fails | Network/firewall issue | Check connectivity to provider's server |
| One-way audio | Codec mismatch or firewall | Try different codecs; open RTP ports |
| Wrong caller ID | CLI rules needed | Add SRC Rewrite rule |
| Number format rejected | Provider expects different format | Add DST Rewrite to format numbers |
Referenceβ
Understanding Regular Expressionsβ
CLI rules use POSIX Regular Expressions:
| Pattern | Meaning |
|---|---|
^ | Start of string |
$ | End of string |
. | Any character |
\d | Any digit |
* | Zero or more of previous |
+ | One or more of previous |
() | Capture group |
\1 | First captured group (in replacement) |
Example: Add "+1" to 10-digit US numbers:
- Pattern:
^(\d{10})$ - Replacement:
+1\1
Inbound Trunk Use Casesβ
| Use Case | Description |
|---|---|
| Multi-Provider Integration | Route numbers from various providers to one system |
| Legacy Migration | Gradually move from old phone systems |
| Geographic Presence | Maintain local numbers from different regions |
| Redundancy | Backup call paths for reliability |
Outbound Route Use Casesβ
| Use Case | How to Configure |
|---|---|
| Cost Savings | Route by destination country to cheapest providers |
| Quality Control | Premium gateway for important calls |
| Local Presence | Present local caller IDs per region |
| Failover | Multiple routes to different gateways |
Getting Helpβ
If you need assistance:
- Open a support ticket with FlyNumber
- Have your provider's documentation ready
- Include (non-sensitive) details about your setup
Some VoIP providers have specific FlyNumber integration guidesβask your provider if one is available.