One of the great features of Outlook Voice Access is the ability to lookup a person in the directory or your personal contacts list and have OVA connect you to that person. This obviously requires support some form of connection to the PSTN. The guide will take you through the steps of configuring the systems to allow OVA to make calls to the PSTN.
A big thanks to Sander de Rijk who provided the basis of these instructions earlier this year.
This guide assumes you have configured Asterisk to connect to your PSTN provider. If not, see my earlier post, then come back when your done.
The first thing you need to do is decide if you want to configure an 'outside line' access code. The most common numbers used for access to the trunk are 0 and 9. However, its becoming increasingly popular not to use such a code, and configure appropriate rules in the various dial plans instead. The following instructions will be based on NOT using a trunk access code, but adding this functionality is very straightforward.
Open the Exchange Management Console, and in the left hand pane, select Organization Configuration, Unified Messaging. Right click on your dial plan, and select Properties. On the Dial Codes tab, enter the dial codes relevant to your location. This can be a little confusing, but the Help button will reveal some information that can guide you through this process. Note that all this information is optional, and if you are only have one dial plan, and are going to making calls within our country/region, you can leave all the fields on this tab blank.
Next, click on the Dialing Rule Groups tab, and add a new In-Country/Region Rule. Give your rule a name, and enter a number mask. In my example below, I take a local 8 digit phone number, and add my state's extension (03) to it.
If I have a number in my contacts or directory that contains the country code (61 for Australia), this rule will remove it, and replace it with a 0 which is used for In-Country dialing.
Continue adding rules for your numbers as required, unfortunately I can't include all the various country and region codes in this guide, but I'm sure you will work them out without too much trouble. Once completed, you should have a list similar to that below.
That completes the Exchange portion of this configuration. Now we need to configure the appropriate rules on the sipX server. Visit the sipXconfig web site, and open the Asterisk dial plan (System->Dial plans->AsteriskDialPlan). Add the dial rules required for your area. If you configured an outside line access number, then you can simply enter that number as the prefix, and select "Any number of digits" from the drop down list.
Save the dial plan, and click Activate above the list of dial plans. Finally, we need to configure the route in Asterisk to send these calls through our PSTN provider. Visit the asterisk configuration page, and from within FreePBX, select Outbound Routes from the left menu. If you have already configured a route to the PSTN, then use that, otherwise add a new route. Add your dial patterns, and select the trunk you configured for your PSTN provider, and save.
Note that I have used different dial patterns on the sipX and Asterisk server. This is just to demonstrate the various ways you can go about configuring these systems. Both sets of rules work and are valid. You can choose less specific rules to make administration easier, or you might need more control over where your calls go (i.e certain calls need to be routed over a specific trunk). All are valid - adjust as needed for your requirements.
Apply your changes to the server, and you are done!