
A SIP trunk can be active in minutes and still fail at the moment a customer needs to reach your team. The difference is usually not the trunk itself. It is the planning behind the provider connection, number assignment, call routing, firewall rules, and testing. Knowing how to configure SIP trunks correctly gives your business a phone system that is easier to scale, manage, and troubleshoot than a collection of disconnected lines.
For a small office, the goal may be simple inbound and outbound calling. For a customer service team, the same trunk may need to feed an IVR, queues, ring groups, time conditions, call recording, and Microsoft Teams users. Start with the call experience you need, then build the technical connection to support it.
Start With a Call Flow, Not the SIP Credentials
Your SIP provider will give you connection details such as a registrar or proxy address, authentication username and password, supported codecs, and caller ID requirements. Those details matter, but they do not answer the operational questions that determine whether calls land in the right place.
Before opening the PBX configuration, map what should happen when someone calls each business number. A main number may play a greeting and offer department choices. A support number may enter a queue during business hours, then route to voicemail or an on-call mobile number after hours. A sales number may ring a group of users simultaneously.
This planning also identifies how many direct inward dial numbers, or DIDs, you need. Some businesses use one main number and extensions. Others assign local numbers to locations, departments, campaigns, or individual employees. Neither approach is automatically better. More numbers improve direct access and reporting, but they add administration and may increase monthly carrier costs.
For outbound calling, decide which numbers users and departments should present. A support team should generally show the support number, not an employee’s personal direct number. Set a clear policy before configuration, because carriers often reject calls when the outbound caller ID is not a number authorized on the account.
Gather the Information Your PBX Needs
A SIP trunk is the virtual connection between your PBX and a carrier’s network. The PBX uses it to send and receive calls, while the carrier provides telephone numbers and access to the public phone network.
Have the provider’s technical details available before you begin. Depending on the carrier, you may receive registration-based credentials, IP-based authentication, or both. With registration, the PBX authenticates to the provider using a username and password. With IP authentication, the carrier permits traffic from your public static IP address. IP authentication can reduce password-related issues, but it requires a stable public IP and careful network management.
You should also confirm the following with your provider:
- The SIP server address, port, transport method, and whether TLS is supported
- The authentication method and the number format required for inbound and outbound calls
- The codecs available, commonly G.711 for standard-quality calling and G.722 for HD-capable endpoints
- The allowed concurrent call capacity, emergency calling requirements, and caller ID rules
- Whether the provider supports international destinations, faxing, or messaging if those services matter to your business
Do not assume that a provider’s default settings match your PBX or deployment. For example, UDP may work for a basic setup, while TLS with SRTP is the better choice where your provider and endpoints support encrypted signaling and media. That added security is worthwhile, although it can require more precise certificate and firewall configuration.
How to Configure SIP Trunks in Your PBX
In the PBX administration portal, create a new SIP trunk and enter the carrier details. Give the trunk a meaningful name, such as “Primary Carrier US” or “Backup Carrier,” rather than a generic label. Clear names save time when an administrator is tracing a failed call or reviewing capacity.
Select the transport protocol and enter the provider’s server or domain. Add registration credentials if your carrier requires them. If the carrier authenticates by IP address, confirm that its portal contains your current public IP address and that your PBX is sending the correct source address.
Next, configure the trunk’s outbound number format. In the US, carriers commonly expect E.164 format, such as +12125551212, or an 11-digit format beginning with 1. The exact requirement varies. Normalize dialed numbers inside the PBX so users can dial naturally while the system sends a consistent format to the carrier. For example, your dial plan can add 1 to a 10-digit US number or preserve the plus sign for international dialing.
Set the codecs in a deliberate order. G.711 is widely compatible and is often the safest baseline for calls to the public network. G.722 can improve audio quality between compatible devices but may not provide an end-to-end HD experience through every carrier. Avoid enabling a long list of codecs simply because they are available. Fewer, well-matched options reduce negotiation failures and make troubleshooting clearer.
Finally, set the maximum number of simultaneous calls for the trunk. This should match or stay below the capacity purchased from the carrier. If you allow more calls than the service supports, callers may receive busy signals or failed-call messages during peak periods. If you set it too low, you create an artificial bottleneck inside the PBX.
Build Inbound Routes Around Business Needs
An inbound route tells the PBX what to do when a call arrives for a specific DID. Match each number to the intended destination: an IVR, queue, ring group, extension, conference room, or voicemail box.
Use time conditions where the call experience changes by schedule. During open hours, a main number can reach a receptionist or IVR. Outside business hours, it can play a short message and offer emergency options. Calendar-based availability is particularly useful for holidays, company events, and temporary closures, since it prevents manual route changes that are easy to forget.
Keep the first greeting practical. Tell callers they have reached the right business, provide the choices they need, and avoid long menus. If your team handles frequent inquiries, route those callers directly to the appropriate queue instead of making them navigate several layers of options.
Create Safe Outbound Routes
Outbound routes define who can call which destinations and through which trunk. A simple configuration may give all users domestic calling. A more controlled configuration can allow international dialing only for approved roles, send emergency calls through a designated carrier, or prioritize a lower-cost route for specific regions.
Use permission controls to reduce toll fraud. International and premium-rate dialing should never be open by default simply because a trunk technically supports it. Create dialing rules that reflect real business requirements, then review them when roles or locations change.
If you use multiple carriers, configure routing priorities and failover behavior. Your primary trunk may handle normal traffic, while a secondary trunk takes over if registration fails or the primary carrier is unavailable. Failover improves resilience, but test it carefully. A backup route is useful only if it has sufficient capacity, valid caller ID settings, and compatible dialing rules.
Prepare the Network Before Blaming the Carrier
Many SIP issues are network issues in disguise. One-way audio, dropped calls after a short period, failed registration, and poor voice quality often point to firewall, NAT, DNS, or bandwidth configuration.
The PBX should have a stable network address, and its public-facing address must be correctly defined in the system settings. Where NAT is involved, the PBX needs to know which local networks are internal and which address it should advertise externally. Otherwise, it may send audio to an unreachable private IP address.
Avoid SIP ALG on routers and firewalls unless you have a specific reason to use it and have verified that it works with your environment. SIP ALG frequently rewrites SIP traffic in ways that break registration or audio. Configure only the ports and protocols required by your PBX and carrier, and restrict access wherever possible instead of exposing management interfaces to the public internet.
Voice quality also depends on bandwidth and latency. G.711 calls typically use roughly 80 to 100 Kbps in each direction once network overhead is included. Calculate for concurrent calls, not total employees. Ten people may work in the office, but if only four calls happen at once, capacity planning should reflect four simultaneous calls plus room for growth and normal business traffic. Quality of Service can help prioritize voice traffic on busy networks, though it cannot compensate for an unreliable internet connection.
Test Real Scenarios Before Going Live
A registered trunk is not a completed deployment. Test inbound calls to every DID, outbound calls from every user group, transfers, voicemail, queue behavior, and caller ID presentation. Make calls during open and closed hours to confirm that time conditions work as intended.
Test audio in both directions. Then test a call held for several minutes, a call transfer to an external number, and an overflow situation in which no one answers a queue. If Teams, desk phones, and mobile clients are all part of the environment, test each endpoint type. The route may work perfectly for one device while an endpoint setting affects another.
Document the final configuration: carrier account details, trunk name, DIDs, route logic, call limits, emergency address information, and escalation contacts. Store credentials securely, not in a shared spreadsheet or an old email thread. This documentation turns an urgent outage into a manageable support task.
A platform such as Ayrix can simplify this work by bringing trunks, users, call flows, Teams telephony, and device management into one web-based environment. The principle remains the same: build the calling experience first, configure the carrier connection carefully, and keep control of the rules behind every call.
The best SIP trunk configuration is not the one with the most settings enabled. It is the one your team can understand, monitor, and adapt when business hours change, call volumes rise, or a new location comes online.