I mentioned last week that I’d explore MSPL more. While researching the Automatic Logout post, I came across a few MSPL-related websites with lots of good information. This week I’ve found a few more–so it’s time to blog!

MSPL – Scripting for Lync Call Routing

MSPL stands for “Microsoft SIP Processing Language”. It’s a scripting language you can use to customize how Lync Server routes SIP messages.
MSPL Scripting Reference – MSDN
Frustratingly, the MSPL Script Syntax has been moved out of the Scripting Reference at MSDN. You’ll find it here instead:
MSPL Script Syntax – MSDN

How Does MSPL Work

The process of creating and adding MSPL scripts to your Lync Server is actually quite simple:

  1. Generate MSPL scripting, either by hand-coding or using an application (see “How to Create MSPL Scripting” below).
  2. Scripting is imported into the Lync Server front end via PowerShell cmdlets
  3. The Lync Server routes SIP messages (like phone calls) where you have directed them.

There’s an excellent how-to writeup at the Code4Lync blog: MSPL SCRIPT HOW-TO – Code4Lync
It documents script structure, when to use MSPL over UCMA, and describes the basic scripting syntax. Worth a read.

MSPL formats as XML when it’s ready for importing. Commenting is included too, so feel free to note your processes.

What You Can Do with MSPL

You are limited in scope to addressing SIP messages within your Lync Server environment. However within that scope, there’s quite a few things you can do with MSPL.

Here are two examples at Channel9:
Lync Server 2013: Use an MSPL Script to Forward IM Calls
Lync Server 2013: Use an MSPL Script to Enforce Custom Privacy Settings

MSPL lets you control routing of calls, Instant Messages and even video from one SIP address to another. Roughly, the more SIP-enabled endpoints you have, the more MSPL routes you can make.

How to Create MSPL Scripting

Like I said before, you can hand-code MSPL, or have an application generate it for you. Last week I visited Matt Landis’ blog and found he’d posted on an MSPL application called SimpleRoute.
The Masses Can Now Make Microsoft Lync MSPL Scripts Via Free Tool from Colima – Microsoft UC Report

I tried this tool out myself. And it works exactly as Matt describes–very easily! I selected Audio/Video call and routed one SIP address to another (using a fake number of course). This only took 3 steps.

Generating MSPL in SimpleRoute

What’s especially valuable about SimpleRoute is that, once you create an MSPL script with it, SimpleRoute actually helps you install it. Remember Steps 2 & 3 above, about importing scripting into Lync Server 2013?

Well, take a look at this. This is what SimpleRoute displays after you click Save:

MSPL Import Instructions in SimpleRoute

==============================
Detailed instructions on how to import the saved script (in an .am file) into the Lync front end via PowerShell. How’s that for helpful?

Download SimpleRoute here: Colima – Customize Lync Routing

MSPL: Good for Basic, User-Level Call Routing

MSPL is a very specific scripting language. It’s pretty much designed to do one thing and one thing only–change SIP routing within Lync Server 2013. I’ve said in the past that I like tools which focus on one job and do it well. MSPL is another example of this.

Administrators should look to MSPL if they want to customize call routing down toward the user-level. Say an employee leaves and you want to route their calls to someone else, right away. Use SimpleRoute to generate some MSPL. It’ll take care of that for you.

Have you used MSPL in your Lync Server environment? What did you do with it? Please comment or email! We’d love to hear about it.

MSPL: What It Is, and How to Use It with Lync Server
Facebooktwittergoogle_plusredditlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *

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