You may have already guessed by reading that haiku that the haiku writer is a little off today. The reason is that this writer was presented with a box of donuts this morning. Now, that’s normally a very good thing, and all in all it was today, too. But, being a little on the slow side this morning (yes, just this morning), this writer was the
person to get to the box of donuts. You might think that in a box of a dozen donuts that wouldn’t be a problem, but it turned out that there was only one donut in the entire dozen that had colored sprinkles on the top. And ‘lo and behold, the
person to the box snatched it up.
Needless to say, we were just a little disconcerted. It still beats the time this same writer went to the coffee shop to get a donut and the person immediately in front of the writer took the
donut. That was pretty traumatic.
. Yes, that was a lousy segue. It would have been better with some sprinkles.
The CsVoiceTestConfiguration cmdlets allow you to set up scenarios that you can use to ensure that given a specific telephone number, that number would be correctly normalized and would follow the expected voice policy, voice route, and dial plan. As you can imagine, this is a pretty handy set of cmdlets to have. You can use them to ensure your Enterprise Voice implementation is set up correctly and to help you troubleshoot any issues you might be having. These cmdlets are sort of like the sprinkles on top of Enterprise Voice.
. All right, we’ll stop with the sprinkles. For now.
These test scenarios are defined at the global scope, so you can name them pretty much anything you want as long as you stay within the character limits (maximum of 32) and the name is unique within your Lync Server deployment. You can set up a very simple test scenario by calling New-CsVoiceTestConfiguration and giving the scenario a unique Identity, like this:
A test scenario must include a phone number against which the test will be run. If you don’t define a number it will default to 1234. You can also configure a test scenario that will run against a specific dial plan and/or voice policy. For example, let’s say you’ve defined a voice policy for your Redmond site (site:Redmond). Now you want to configure a test scenario where you can enter a phone number and see what would happen to that number if it were dialed by a user who was using the site:Redmond voice policy. Here’s what the command to create the scenario looks like:
Test scenarios are run against expected outcomes. By default the expected translated number is +1234. If you don’t expect the number you enter as the DialedNumber to be normalized to +1234, you need to specify a value for the ExpectedTranslatedNumber parameter. For example, suppose you’ve set up a dial plan named SevenDigitDialing. You’ve set up that dial plan so that if a user assigned to that dial plan dials the number 5551234, that number will be normalized to +12065551234. To make sure that the normalization rules are applied correctly, you’d create a test scenario that would check the dialed number against the expected results using that dial plan. Kind of like this:
You might have noticed that, while we’ve configured some voice test scenarios, we haven’t actually run any. So let’s give that a try. To run our test scenarios, we use the Test-CsVoiceTestConfiguration cmdlet:
The first thing you’ll notice is that you can’t simply call Test-CsVoiceTestConfiguration and pass it the name of a test configuration. Test-CsVoiceTestConfiguration requires you to pass it a reference to an actual voice test configuration object. We get that reference by calling Get-CsVoiceTestConfiguration, giving it the Identity of the configuration we want to use for our test, and piping that to Test-CsVoiceTestConfiguration. Your output will look similar to this:
And that’s all there is to it. If your test doesn’t succeed, the Result will come back as Fail. The reasons for failure might be a little tough to figure out, but if FirstMatchingRoute is empty, that means that a voice route wasn’t found that can work with that scenario. You’ll just have to kind of work through any failures on your own.
In the meantime, we’ll hope for brighter days in the future, where the sun is shining and the sky isn’t sprinkling, but the donuts are.