Trunks
The Trunks section allows you to manage communication pathways for both incoming and outgoing calls. Trunks create flexible connections between your FlyNumber phone system and external service providers, giving you control over call routing, protocols, and call display information.
This feature is not enabled by default. If you need to use custom trunks for your phone system, please contact FlyNumber support to open a ticket and request activation of this feature for your account.
What Are Trunks?β
Think of trunks as dedicated highways for your voice traffic. They establish how calls enter and exit your phone system, determining:
- How incoming calls from external providers reach your system
- How outgoing calls connect to the public telephone network
- What caller information displays during calls
- Which audio codecs are used for optimal sound quality
Why Use Custom Trunks?
Custom trunks provide several advantages for businesses with specific requirements:
- Provider Flexibility: Use multiple VoIP providers simultaneously
- Cost Control: Route calls through the most economical providers
- Advanced Number Management: Maintain existing numbers with other providers
- Custom Call Routing: Create sophisticated routing rules based on call patterns
- Enhanced Redundancy: Set up backup pathways for business continuity
The Trunks interface is divided into three primary sections:
- Inbound Trunks: Manage how external calls arrive in your phone system
- Termination Gateways: Configure connections to external VoIP providers
- Termination Routes: Create routing rules for outbound calls
Inbound Trunksβ
Inbound trunks allow you to receive calls from external VoIP providers directly into your FlyNumber phone system for processing. This is particularly useful when you have existing phone numbers with other providers that you want to integrate with your system.
Creating an Inbound Trunkβ
To create a new inbound trunk:
- Navigate to Trunks > Inbound Trunks
- Click the + button in the lower right corner
- Configure the following settings:
General Settingsβ
Setting | Description |
---|---|
Domain | Auto-generated unique domain (e.g., xxxxxxx.in.phone.systems) |
Name | Friendly name to identify this trunk |
Transport Protocol | UDP (most common) or TCP |
Lookup Destination By | How to route incoming calls (typically R-URI username part) |
Allowed Codecs | Audio formats supported (OPUS, G722, PCMA, etc.) |
Registration (Optional)β
If your provider requires registration:
- Toggle "Enable registration" to ON
- Enter the registration details:
- Domain (typically your provider's SIP domain)
- Port (usually 5060, consult your provider)
- Username
- Password
- Contact user (optional identifier)
Registration allows your trunk to authenticate with providers that require it. If your provider doesn't require registration, you can leave this section disabled.
CLI Rulesβ
CLI (Caller Line Identification) rules allow you to modify how caller information appears when calls come through this trunk.
You can create rules to:
- Change caller names (e.g., add your company name)
- Modify destination numbers (e.g., remove country codes)
- Apply custom formatting to enhance caller identification
CLI rules use POSIX Regular Expressions for pattern matching and replacement. Use the examples provided in the interface for guidance.
Technical Detailsβ
When configuring an inbound trunk:
- Each trunk receives a unique SIP domain address
- Phone numbers should be in E.164 format (e.g., +12025551234)
- Your SIP provider needs to forward calls to your trunk's domain
- The system automatically creates a default inbound trunk
Best Practicesβ
- Clear Naming: Use descriptive names that identify the provider or purpose
- Registration Check: Test registration status to ensure proper connectivity
- Codec Selection: Choose appropriate codecs based on quality needs and bandwidth
- CLI Rules: Use CLI rules to present consistent caller information
- Provider Documentation: Consult your VoIP provider's specific instructions
When configuring CLI rules, start with simple patterns and test thoroughly before implementing complex rules. This helps prevent unexpected call routing issues.
Inbound Trunk Use Casesβ
Use Case | Description |
---|---|
Multi-Provider Integration | Connect numbers from different providers to a single system |
Legacy System Migration | Gradually transition from older phone systems |
Geographic Flexibility | Maintain local presence numbers from various regions |
Redundancy | Create backup call paths for business continuity |
Termination Gatewaysβ
Termination Gateways connect your FlyNumber phone system to external VoIP providers for outbound calling. They act as bridges that route your outgoing calls to the public telephone network or other SIP destinations.
Creating a Termination Gatewayβ
To set up a new termination gateway:
- Navigate to Trunks > Termination Gateways
- Click the + button in the lower right corner
- Configure the following settings:
General Settingsβ
Setting | Description |
---|---|
Name | Descriptive name for this gateway (e.g., "Main Provider" or "International") |
Network Protocol | Usually "IPv4 Only" (based on your provider's requirements) |
Username | Authentication username from your termination provider |
Password | Authentication password from your termination provider |
Host | IP address or domain name of your provider's SIP server |
Port | Connection port (typically 5060 for UDP/TCP or 5061 for TLS) |
Allowed Codecs | Audio formats supported (prioritize in order of preference) |
When selecting codecs, keep in mind:
- OPUS offers the highest quality but requires more bandwidth
- G722 provides HD voice quality
- PCMU/PCMA (G.711) are widely supported standard codecs
- G729 uses less bandwidth but with slightly lower quality
- Always include "telephone-event" for proper DTMF tone handling
CLI Rules for Termination Gatewaysβ
CLI rules for termination gateways control how caller information appears in outbound calls:
Rule Type | Purpose |
---|---|
SRC Rewrite | Modify the caller ID number shown to the recipient |
DST Rewrite | Adjust the format of the dialed destination number |
These rules are particularly useful for:
- Adding or removing country codes
- Ensuring proper number formatting for your provider
- Presenting consistent company caller ID
Technical Considerationsβ
- Provider Requirements: Always consult your VoIP provider's documentation for specific setup instructions
- Firewall Settings: Ensure your network allows traffic on the specified ports
- Codec Compatibility: Verify your provider supports your preferred codecs
- Call Quality: Network conditions and codec selection directly impact call clarity
Termination Routesβ
Termination Routes define the pathways for outbound calls through your configured gateways. They give you granular control over which calls use which gateways based on number patterns.
Creating a Termination Routeβ
To create a new termination route:
- Navigate to Trunks > Termination Routes
- Click the + button in the lower right corner
- Configure the following settings:
Route Settingsβ
Setting | Description |
---|---|
Name | Descriptive name for this route (e.g., "Local Calls" or "International") |
SRC Prefix | Optional prefix for matching source numbers (caller) |
DST Prefix | Optional prefix for matching destination numbers (dialed) |
Gateway | The termination gateway to use for calls matching this route |
CLI Rules for Routesβ
Similar to gateway CLI rules, route-specific rules offer another layer of number formatting control:
Rule Type | Purpose |
---|---|
SRC Rewrite | Modify caller ID specifically for this route |
SRC Rewrite Result | The transformed source number pattern |
DST Rewrite | Pattern to match in dialed numbers |
DST Rewrite Result | How to reformat matched destination numbers |
How Route Selection Worksβ
When a user makes an outbound call, the system:
- Compares the call's source and destination numbers against all routes
- Selects the route with the most specific matching prefixes
- Applies any CLI rules associated with that route
- Routes the call through the specified gateway
- A route with both SRC and DST prefixes takes precedence over a route with only one prefix
- Longer prefix matches are more specific than shorter ones
- If multiple routes match equally, the system uses the first matching route
Outbound Routing Use Casesβ
Use Case | Configuration |
---|---|
Cost Optimization | Create routes for different regions using the most cost-effective gateways for each |
Call Quality Management | Use high-quality providers for important business calls and standard providers for other calls |
Geographic Flexibility | Set up different routes to present local caller IDs for different regions |
Redundancy | Configure backup gateways that activate if primary connections fail |
Number Formatting | Use CLI rules to automatically format numbers based on country or provider requirements |
Troubleshootingβ
Issue | Possible Solution |
---|---|
Failed Registration | Check provider credentials and network connectivity |
One-way Audio | Verify codec compatibility and firewall settings |
Poor Call Quality | Test with different codecs or check network conditions |
Incorrect Caller ID | Adjust CLI rules to ensure proper formatting |
Number Format Errors | Verify provider's expected number format and update CLI rules |
Understanding POSIX Regular Expressions
CLI rules use POSIX Regular Expressions for pattern matching. Here are some basic patterns:
Pattern | Matches |
---|---|
^ | Start of string |
$ | End of string |
. | Any single character |
\d | Any digit |
* | Zero or more of previous character |
+ | One or more of previous character |
() | Grouping for capturing or precedence |
\1 | First capture group (in replacement) |
Example: To add "+1" to 10-digit US numbers:
- Pattern:
^(\d{10})$
- Replacement:
+1\1
Always test your trunk configuration thoroughly before using it in a production environment. Make test calls to various destinations to verify both connectivity and audio quality.
Getting Helpβ
If you encounter issues configuring your trunks or need assistance with specific provider settings:
- Contact FlyNumber support to open a ticket with your specific question
- Have your provider's technical documentation available for reference
- Be prepared to share (non-sensitive) details about your provider's requirements
Some VoIP providers offer specific FlyNumber integration guidesβask your provider if they have one available.