Microsoft SIP Processing language Script (Lync Server 2013 Preview SDK)

Lync 2013

Learn about the Microsoft SIP Processing Language (MSPL) script that filters and routes SIP messages.

Last modified: August 16, 2013

Applies to: Lync 2013 | Lync Server 2013

The MSPL script provides basic control for filtering and routing SIP messages. The script block is contained in the <splScript> element in the application manifest. The to-be-processed message types are also specified in the application manifest.

MSPL supports the message processing through a set of built-in constants, variables, classes, and functions. When a message that matches the type is specified in the application manifest, the server invokes the script and passes the message to the application in the sipRequest, sipResponse, and sipMessage variables. These variables correspond to instances of the Request, Response, and Message built-in classes. When passed into the script, the message headers can be inspected or adjusted and the message payload can be examined or updated by using the MSPL built-in functions. The modified message can then be routed back to the server for additional processing by using the ProxyRequest or ProxyResponse function, depending on whether the message is a sipRequest or sipResponse.

In a more advanced application, the message can also be forked to other endpoints by calling the Fork function against each endpoint’s SIP URI. All the Fork calls must be enclosed between BeginFork and EndFork functions.

To debug, you use the Log function that traces the script executions to Windows Event Viewer or the Microsoft Lync Server 2013 SDK Logging tool.

MSPL script is intended for simple message processing without reducing server performance and without accessing any external sources of information, such as a database or Active Directory. In the more advanced application scenarios, a MSPL script can delegate additional processing to a managed application component. The built-in function of Dispatch is used to forward the message to the managed code from the script.

For a summary of the script syntax, see MSPL Script Syntax (Lync Server 2013 Preview SDK). For more information about MSPL, including built-in types, variables, classes, and functions, see MSPL Scripting Reference.

Show: