FreePBX 12 – Calling local numbers

Because VOIP works over the internet there is no real concept of “local”. However, our telephone users may be used to dialing numbers in a certain way. Maybe they dial 9 for an “outside line”, maybe they don’t have to dial the area code for “local” numbers, etc …

We can accommodate this by manipulating the number the user dials in to the format expected by our call provider. You can manipulate the number either on the “Outbound Route” or on the “Trunk”.

Which you choose depends on your setup and why you are manipulating the number. For example if your users dial “9” for an outside line it probably makes sense to remove this on the Outbound Route as whatever call provider you are using you will want to remove the 9. However, if your call provider expects the dialed number is a specific format (maybe country code + number in international format) it probably makes sense to do this on the trunk, as other call providers could be different.

In the post here we created an Outbound Route called “outbound” which sends all numbers called to our trunk unmodified. Now, above the Outbound Route called “outbound” I am going to create a new route for our local calls. These modifications could just be added to the existing “outbound” route, it’s personal preference but I think it makes it easier to see what’s happening as a separate route.

1 – Create a new route for local calls

Give the new Outbound Route a name

FreePBX 12 Add outbound route

Next I add a dial pattern that will match any 6 digit number called that begins with a 2 or higher and add 01604 to the front of the number before sending it to the trunk. Deciding on the pattern to match can be the tricky part. Always test the system behaves as expected after creating new routes.

You can click on the blue question mark for more information on creating dial patterns

FreePBX 12 Outbound Route Dial Pattern

Finally submit your changes.

2 – Check the Outbound Route order

Now you need to make sure that the local call route is processed before the general “outbound” route. The most specific routes should be placed above any general routes

FreePBX 12 rearrange outbound route order

3 – Give it a try

Finally apply the changes and give it a go. You should make sure that local calls, and normal calls are working as expected.