"Trunks" are connections to the PSTN (Public Switched Telephone Network). "PSTN" is a fancy acronym that basically means: you can call other people.
All phone systems (legacy or IP) require trunks. A phone system is not the same as phone service.
Phone Service comes from a phone company (including VoIP providers)
Phone Systems come from Fonality!
Please read about trunks at the links below:
If your analog lines use Centrex - DO NOT EVER STRIP THE 9 IN THE EXAMPLES BELOW.
This condition only applies to a small number of users. If you do not have Centrex on your analog lines - ignore this section completely.

The long distance dial plan is configured on all systems by default. It includes only 2 digits and 10 variables.
In this dial plan, we statically list a US area code at the beginning of the string. Unlike the standard long-distance dial plan, this configuration does the following:
Many Call Centers configure multiple VoIP accounts which offer cheap calls to and from specific locations. If you have a VoIP service like this, you can change the Route for these specific destinations in order to maximize cost savings on each call to the destination.
In the Dial String field - we statically assign "303" as the area code (Denver, CO). ALL calls dialed to a 303 area code will use Cbeyond VoIP (as configured above) as the primary route.
Cbeyond might be offering us unlimited free inbound and outbound calls to Denver, CO, which is why we choose this as the primary trunk.
Standard International dial plans are very simple.
It's important to use the . symbol sparingly when creating your dial plans. You could unintentionally create two similar dial plans that overlap.
Let's look at the Route, Strip, and Prepend fields:
9 011 81 090 5432 1234
Strip 9 011
81 090 5432 1234
Prepend +
+ 81 090 5432 1234
The last number is the number that will be sent to Bandwidth properly formatted according to this company's dial plan rules.
Different companies may have different rules about dial plans - please check with your PROVIDER for the proper formatting conventions.

In the dial plan above, we have introduced a new convention - access code restrictions - preventing people who do not know the code from making International calls.
In the Dial String area, we have created a random code of 87643. We should give this code to our Executive team or anyone authorized to make International calls.
When an authorized person tries to dial an International call - they will need to dial 87643 + the International number in order to successfully place the call.
Using the Strip Digits field, we remove the first 6 digits from this dial string. In other words - we are removing the 9 + 87643 before sending the string to the telephone company (or VoIP Provider).
In this fashion - we have created a usable access code preventing unauthorized people from placing calls to certain destinations.

Customers who purchased the Linked Server option can configure their dial plans such that users on Server A can place outbound calls through Server B's trunks (PRI, Analog lines, VoIP trunk, etc.)
The dial plan above demonstrates this configuration. To understand this dial plan, you should:
When you select the Route for a linked-server dial plan, you must choose from:
The difference between these two types is as follows:
An Internal connection tries to use the private IP address of each server in order to communicate. If your servers are setup in geographically different locations (such as NY and LA), then you will most likely not be able to use the Internal connection.
If you have a VPN connecting all sites (recommended whenever possible) then you CAN use the Internal route.
An External connection uses the public IP address of each server in order to communicate. This is analogous to your PC contacting Google to search. Your public IP address is used to communicate with the public IP address of a server in the Google network.
External connections should always work as long as the firewall at each location allows UDP 4569 to your phone system.

If your office is located in a part of America where 10-digit dialing is not yet standard, you can create a dial plan to automatically add the area-code to all local numbers.
Most VoIP providers require 10-digit-dialing. But forcing users who are accustomed to making local calls without dialing their own area code to change is too difficult and time consuming for administrators.
Crafty dial plans solve this problem nicely.
In the image above, we have a leading 9 followed by 7 digits. Simple enough. For the route, we've chosen Bandwidth.com (as an example), and then we use the Strip field to remove the 9.
The Prepend field does all the work of adding the properly-formatted area code for us.
We insert +310 for Bandwidth because they require a leading + sign for all calls. The next two providers do not require this + sign, so we simply insert 310.
This dial plan accomplishes local calls from the 310 area code to another number in the 310 area code such that end-users only need dial the 7 digit phone number. The server adds 310, and sends all 10 digits (minus the 9) to the telephone company (or VoIP provider).
In the list of Dial Strings at left, there are two strings that overlap and will cause problems on your server.
9 + 432nxxxxxx and 9 + 4322011. serve the 432 area code as well as provide an access restriction for International Calls.
Except no one on this server will ever be able to place an International Call.
The reason is:
9 + 4322011xxx will match a phone number in the 432 area code (or if it's not an active number, the caller will hear a "the number dialed does not exist - please hang up and try again" message).
Because of the . variable in the International Dial String, and the 432nxxxxxx variable string, dialing 4322 as an access code actually matches the 432 area code plus the n variable is any number other than 0 or 1. 2 is neither 0 nor 1, so we have a match.
All calls dialed using the access code will incorrectly match the long-distance dial string, and calls will fail.
Please be careful your dial plans do not overlap, or you will not experience the call routing you expect.