Partager via


SIP Application Manifest Example

SIP Application Manifest Example

Following is an example of a basic application manifest that handles only SIP INVITE and MESSAGE requests.

<?xml version="1.0" ?>

<!-- Set the application URI, the namespace prefix, and the namespace name -->
<lc:applicationManifest
    appUri="http://www.adatum.com/myApplicationLocation"
    xmlns:lc="https://schemas.microsoft.com/lcs/2006/05">

    <!-- Define properties of the application -->
    <lc:requestFilter methodNames="INVITE,MESSAGE"
                      strictRoute="false"
                      registrarGenerated="true"
                      domainSupported="true"/ >
    <lc:responseFilter reasonCodes="NONE" />
    <lc:proxyByDefault action="true" />
    <lc:scriptOnly />

    <!-- The message filtering script -->
    <lc:splScript><![CDATA[
      if (sipRequest) {
        if (sipRequest.Method == StandardMethod.Invite) {
          Dispatch("NameOfInviteHandlerMethodInApplicationHere");
        }
        else if (sipRequest.Method == StandardMethod.Message) {
          Dispatch("NameofMessageHandlerMethodInApplicationHere");
        }
      }
    ]]></lc:splScript>

</lc:applicationManifest>

In this example, the appUri attribute of the applicationManifest element specifies the URI that uniquely identifies the application to Microsoft Lync Server 2010. The xmlns attribute specifies the namespace alias. The namespace alias identifies the XML elements in the manifest that are specific to the application. In this example, the namespace alias is set to "lc" and is separated from each element name using a colon.

The requestFilter and responseFilter elements set the basic filters for SIP request and response messages, respectively. These settings control the types of messages that the application processes. In the preceding example, only requests with a SIP method type of INVITE or MESSAGE are dispatched to the application. SIP reason codes from responses are not passed to the application.

The presence of the scriptOnly element indicates that the application has no managed code component, and that all message handling is performed solely within the Microsoft SIP Processing Language (MSPL) script. For SIP managed code applications, this element must be absent from the manifest.

The message filtering script itself is defined in the CDATA section that is contained in the splScript element.

See Application Attribute Elements for descriptions of all of the possible application manifest elements.

See Also

Concepts

SIP Application Manifests (Lync Server 2010 SDK)

Creating an Application Manifest

applicationManifest Element

splScript Element

Loading an Application Manifest