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

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 sipMessagevariables. These variables correspond to instances of the Request , Response , and Message (MSPL) 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 sipRequestor 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 Forkcalls must be enclosed between BeginFork and EndFork functions.

To debug, you use the Logfunction 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 . For more information about MSPL, including built-in types, variables, classes, and functions, see MSPL scripting reference .

See also