The Office Communications Server 2007 R2 application programming interface (API) is built on the Session Initiation Protocol (SIP) proxy platform and implemented using the following:
-
Server API module (Apiem.dll).An extension that provides the
basic scripting capability for creating custom message filters and
routing applications. The scripts can either run in process with
Office Communications Server 2007 R2 (Rtcsrv.exe) or can be
incorporated in a managed server application that is running in a
separate process.
-
Managed server API platform (ServerAgent.dll).A platform
that you use to implement both Microsoft and non-Microsoft managed
server applications. Managed server applications that are written
by using the managed server API run as separate processes.
-
Local shared-memory IPC (Queue.dll).The interface between
the server API module and managed applications.
-
Internal COM API.An API used to communicate with the SIP
proxy platform.
The following figure shows how the API architecture is implemented for Front End Servers.
SIP-aware managed server applications that are developed by using the managed server API platform extend the core services available in Office Communications Server2007 R2. Managed server applications include both of the following:
- Office Communications Server 2007 R2 applications implemented
by using RTCHost.exe. This includes the following filtering
applications: Voice over Internet Protocol (VoIP) applications,
conferencing server Factory, Real-time Communications (RTC)
Aggregate application, and other applications (that is,
non-Microsoft applications). For details about the managed server
applications implemented with RTCHost.exe, see
RTCHost.
- Non-Microsoft applications developed in-house, by vendors, or
by using other resources.
The managed server API for implementing these applications functions as follows:
- Exposed through the Microsoft.Rtc.Sip namespace.
- Uses the server API to perform specific SIP message processing
tasks.
- Implemented by using the managed server application platform
(that is, ServerAgent.dll assembly). Each managed application loads
the ServerAgent.dll and executes in its own process space. Managed
applications are isolated from each other in a way that prevents a
faulty application from affecting other applications.
Following are the two major components of the server API module (Apiem.dll) that support implementation of managed server applications:
-
Application manifest.A script that is written by using
Microsoft SIP Processing Language (MSPL) and describes an
application to the server. When a managed server application
registers with the server using the
ServerAgentclass, it provides this script to the server. The
application manifest serves the following purposes:
- Provides details about the application type and the state that
the server needs to maintain for the application to run, so the
server can optimize processing for the application.
- Contains a message filter script to communicate detailed
information about which messages (that is, requests and responses)
the application needs to see. To filter messages, the application
manifest has a set of built-in actions that it can invoke. For any
other actions required by a specific message (that is, those
actions that cannot be handled by the built-in actions), the
application manifest can invoke managed code in a separate
application process by passing all or parts of the message to the
code in the application process. Using the built-in actions helps
you avoid cross-process calls for simple processing (for example,
basic if, then, and else functions).
- Enables the application developer to specify moderate amount of
logic to be executed by an interpreter inside the server API
module. If the functionality of the interpreter is not sufficient,
a cross-process call is made as a single call containing only the
portions of the message that are appropriate to the message
filtering used.
- Uses an application Uniform Resource Identifier (URI) to
uniquely identify the application to the server. The application
URI is expected to be an HTTP URL, but no validation is performed.
- Provides details about the application type and the state that
the server needs to maintain for the application to run, so the
server can optimize processing for the application.
-
Microsoft.Rtc.Sip class library.Contains the following
classes:
- SIP message and transaction processing classes.
-
ServerAgentclass. This class implements most of the logic
needed to manage sessions with the server. It is the entry point
for the managed server API. Each application initiates an instance
of ServerAgent.dll and supplies an application manifest instance to
it. The ServerAgent.dll assembly manages the session with the
server, including compiling the application manifest and
registering with the server. If the registration succeeds, the
ServerAgentclass sets up the environment necessary to
receive and process SIP messages from the server. The
ServerAgent.dll assembly invokes application-specific event
handlers for specific events (for example, message events and
transaction events). For each instance of the application, a single
ServerAgent.dll object manages the applications session with the
server. To exit, the application releases the ServerAgent.dll
object, which causes the session with the server to end.
You can use the Office Communications Server 2007 R2 Software Development Kit (SDK) to develop applications by using the Microsoft.Rtc.Sip class library. You can download the SDK athttp://go.microsoft.com/fwlink/?LinkId=144480 . For details about using the SDK, see “Communications Server 2007 R2 Server SDK Documentation” athttp://go.microsoft.com/fwlink/?LinkId=144482 .
- SIP message and transaction processing classes.