Microsoft SIP Processing Language (MSPL) is a great way to extend the possibilities of Lync, and there are plenty of resources available to help you get started.
I recently talked about MSPL during a training, and was asked to share the example I demoed. Originally it was used as a work around for the ringback issue as explained in http://blogs.technet.com/b/dougl/archive/2009/07/30/ring-back-workaround-for-ocs.aspx. It also shows a way to document the changes made from within PowerShell.
- Administrative permissions to install the script
- PoolFQDN name (pool01.contoso.com)
- RespondWithRinging.am file from http://blogs.technet.com/b/dougl/archive/2009/07/30/ring-back-workaround-for-ocs.aspx
On a FrontEnd server:
- Create a folder MSPL with subfolder Support and copy the RespondWithRinging.am file to the MSPL folder.
- In RespondWithRinging.am adjust the appUri to the URI used in the configuration, www.contoso.com/RespondWithRinging, (the default names could be used, but this prevents confusion).
In the Lync Server Management Shell:
- Use Start-Transript to log your actions.
- Backup the current configuration: Export-CsConfiguration -FileName C:\MSPL\Support\Config.zip
- Optional: Use Get-CSServerApplication to check which applications are currently configured. Get-CsServerApplication -Filter “service:*:pool01.contoso.com*” > C:\MSPL\Support\Applications01.txt
Next check the priority of the UserServices because this application needs to have a higher priority than UserServices.
- Get-CsServerApplication -Filter “Service:Registrar:pool01.contoso.com/UserServices”
Identity : Service:Registrar:pool01.contoso.com/UserServices
Priority : 3
Name : UserServices
Enabled : True
Critical : True
Next create the application with the New-CsServerApplication commandlet with the priority of the UserServices (3 in this case). This results in a priority of 4 for the UserServices.
- New-CsServerApplication -Identity “Registrar:pool01.contoso.com/RespondWithRinging” -Uri http://www.contoso.com/RespondWithRinging -Critical $False -Enabled $True -Priority 3 -ScriptName “C:\MSPL\RespondWithRinging.am”
Identity : Service:Registrar:pool01.contoso.com/RespondWithRinging
Priority : 3
Name : RespondWithRinging
Enabled : True
Critical : False
ScriptName : C:\MSPL\RespondWithRinging.am
- Optional: Use Get-CSServerApplication again to check which applications are currently configured. Get-CsServerApplication -Filter “service:*:pool01.contoso.com*” > C:\MSPL\Support\Applications02.txt
- Check Lync eventlog for event id’s 30803 and 30208.
Loading application – ‘C:\MSPL\RespondWithRinging.am’
Lync Server application has successfully registered.
Application Uri ‘http://www.contoso.com/RespondWithRinging‘
- To compile the application: Stop-CsWindowsService and Start-CsWindowsService.
- Stop-Transcript to stop logging.
Lync team blog article about MSPL: http://blogs.technet.com/b/nexthop/archive/2012/03/14/deploying-and-troubleshooting-lync-server-2010-mspl-applications.aspx
http://blogs.technet.com/b/dougl/archive/2009/07/30/ring-back-workaround-for-ocs.aspx (source for this workaround)