Skype for Business Online Cloud PBX: Picking Good Numbers

Not your granddaddy’s SfBO

Late last year, Microsoft released a dial-in conferencing and PSTN add-on to the popular Office 365 suite. With these new features, I expect Skype for Business Online to attract serious interest. As a technical implementer, if you’re Office 365 focus has been limited to Exchange and SharePoint Online, you’ll want to be sure you’re positioned to support these new features before your competition beats you to it!

For an excellent, no-fluff introduction to the topic, I recommend you read fellow MVP Paul Robichaux’s article over on WindowsITPro: “Skype for Business: PSTN Calling

Selecting Pleasant Telephone Numbers

One of the first things you’ll want to do after you’ve got the necessary licensing situated is to assign phone numbers to your users. If you’re using the Admin Center, you’ll find this approach is documented here.

When using this screen to assign numbers to my business, I found that the numbers that were being presented weren’t very palatable.AdminCenterNumbers

Obviously this is a subjective assessment, though as an example, you’ll likely agree that numbers that end in ‘0000’ are generally more desirable and memorable than those that involve digits from all over your dial pad. Maybe there is some secret TelCo handshake which allows you to pick from great phone numbers, but alas, I don’t know it. 😦

Perhaps more frustratingly, is the fact the portal limits you by showing only a few numbers at a time (per 10 minutes). Based on my business’ location in in Maryland, I wanted a 301 number, but am I supposed to look at 10 numbers every 10 minutes? I’ve not done this with a large tenant yet, so it is possible this UI scales with more licenses/users, but in my testing I couldn’t find a way around this issue.

The good news however, is that PowerShell once again comes to the rescue! Using the Skype for Business Online cmdlets, we are able to bypass the selection limits of the Admin Center and view up to 200 numbers, in a given city, at a time.

The approach is as follows:

  1. Download and install the SfBO PowerShell module.
  2. Establish a PowerShell remoting session.
  3. Figure out what region you want numbers for, and take note of the geocodes.
  4. Search the inventory, reserving 200 numbers for 10 minutes.
  5. If necessary, manually release the numbers and look at another region.
  6. If all else fails, wait 10+ minutes and re-try the above.

Search and Filter with PowerShell

Connect to SfBO

$credential = Get-Credential mike@contoso.com
$lyncSession = New-CsOnlineSession -Credential $credential
Import-PSSession $lyncSession

Search the inventory

$x = Search-CsOnlineTelephoneNumberInventory -InventoryType Subscriber -Region NOAM -Country US -Area MD -City SS -Quantity 200
Get-CsOnlineTelephoneNumberReservationsInformation

$x.Reservations.numbers.DisplayNumber

Use PowerShell filtering to find desirable number patterns

#Numbers with 00
$x.Reservations.numbers.DisplayNumber | ? {$_ -like '*00*'}

#Numbers ending in 0
$x.Reservations.numbers.DisplayNumber | ? {$_ -like '*0'}

#Numbers not containing 304
$x.Reservations.numbers.DisplayNumber | ? {$_ -notlike '*304*'}

#Numbers with 0 in the last group
$x.Reservations.numbers.DisplayNumber | ? {(($_ -split ' ' )[-1]) -like '*0*'}

PowerShell PSTN FilteringRelease the numbers and look at a different region (avoiding the 10 minute wait)

Clear-CsOnlineTelephoneNumberReservation -ReservationId $x.ReservationId -InventoryType subscriber
$x = Search-CsOnlineTelephoneNumberInventory -InventoryType Subscriber -Region NOAM -Country US -Area MD -City BE -Quantity 200

$x.Reservations.numbers.DisplayNumber

Select the numbers you like (Don’t forget to include the country code)

Select-CsOnlineTelephoneNumberInventory -ReservationId $x.ReservationId -TelephoneNumbers 13010000000, 13010000003, 13010000002 -Region NOAM -Country US -Area MD -City SS

NOTE: I haven’t worked out the code myself, but you may want to find phone numbers in consecutive blocks, so here is a topic that discusses how to do that.

Once you’ve got the numbers reserved, you can continue to use PowerShell to assign them to your licensed users, or you can go back to the Admin Center and assign them there.

——————– EDIT: December 2016 ——————–

The GeoCode documentation is being depricated. To determine your GeoCode utilize these cmdlets

e.g.

Get-CsOnlineTelephoneNumberInventoryRegions -InventoryType Subscriber
Get-CsOnlineTelephoneNumberInventoryCountries -InventoryType Subscriber -RegionalGroup NOAM
Get-CsOnlineTelephoneNumberInventoryAreas -InventoryType Subscriber -RegionalGroup NOAM -CountryOrRegion US
Get-CsOnlineTelephoneNumberInventoryCities -InventoryType Subscriber -RegionalGroup NOAM -CountryOrRegion US -Area MD

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s