Import Exchange Dialing Rule Groups from CSV

Manually keying a large site’s dial plan into Exchange to cater for the various combinations of exchange prefix & extension number is tedious and frankly quite boring. Import-CSV to the rescue!

Thankfully these days most customers are loathe to permit Exchange to route a call to anyone other than an internal extension. Those of us who’ve been in the industry long enough will have scars from exposure to a customer being phreaked (and the 6-figure phone bills), so a request to enable “thru-dialling” these days usually receives an “over my dead body”-style response.

The upside is that we now don’t need to worry about building GIANT tables in Exchange with the myriad of possible PSTN prefixes and destinations, instead only requiring just those that belong to the site.

With this as the goal, I just create a CSV formatted like the below. Don’t forget the header row, and make sure there are no rogue commas or spaces in your comment field. In this example I only have 2 hundred ranges, but of course many customers will have a lot more.

name,NumberMask,DialedNumber,comment 
Sydney Extensions,700012xx,+612700012xx,12xx extensions dialled as 8 digits 
Sydney Extensions,700013xx,+612700013xx,13xx extensions dialled as 8 digits

Sydney Extensions,12xx,+612700012xx,12xx extensions dialled as 4 digits 
Sydney Extensions,13xx,+612700013xx,13xx extensions dialled as 4 digits

I left the blank line in the above to separate the two sections, but please remove this in your final version lest Exchange terminate the input prematurely.

These two sets of entries mean Exchange will correctly detect and route a call to a user if they’re dialled as a 4-digit extension number, or their 8-digit external PSTN number. If you’re feeling generous, why not repeat the top two entries with the local area code in there as well?

Now just run this commandlet to import it:

Set-UMDialPlan "<DialPlanName>" -ConfiguredInCountryorRegionGroups $(IMPORT-CSV c:\<filename>.csv) –Verbose

Once done, don’t forget to check your work – and remember to associate the dialing rule group/s on the Dialing Restrictions tab of the Dial Plan, Mailbox Policy and Auto-Attendant.

This shows where the restrictions are applied:

DialingRestrictions

Sourced (and the drawing shamelessly lifted) from the Exchange team blog.

 

G.

Leave a Reply

Your email address will not be published.

... and please just confirm for me that you're not a bot first: Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.