This documentation is archived and is not being maintained.

Broadcast IM Sample Application

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The BroadcastIM sample demonstrates how to send a text message to the members of a distribution group in the Active Directory. The application provides progress information and the result of the notification to each member of the distribution group. This sample application is meant to provide a quick start for use of the Microsoft Unified Communications Managed API, it is not meant to run in production.

  • The BroadcastIM sample broadcasts an instant messaging notification to the members of an Active Directory distribution group.
  • The user can choose either Transmission Control Protocol (TCP) or Transport Layer Security (TLS) protocol.
  • The sample uses the SipPeerToPeerEndpoint class.

To run this sample, you need:

  • Microsoft Visual Studio 2005 Service Pack 1 (SP1).
  • Unified Communications Managed API version 1.0 SDK.
  • Administrator permissions on Microsoft Office Communications Server 2007.
  • For the account running the sample application, sufficient permissions to execute unmanaged code, to read the certificate store and the private key, and for file access if tracing is enabled.
  • The recipients of the instant messaging notification must be signed into a version of Office Communicator 2007 compatible with Office Communications Server.
  • The distribution group entered on the Notification Form in the sample application must exist as a distribution group in Active Directory. Note that the distribution list expansion logic implemented in the sample is limited to the default maximum number of members in an Active Directory distribution list. The maximum number of members is defined by the MaxGroupSize property, configurable in Microsoft Windows Management Instrumentation (WMI).

While the BroadcastIM sample is a Win32.exe application, authors need to be prepared to do the following:

  • Create a trusted service entry in Active Directory.
  • Create an Active Directory contact object.
  • Retrieve data through WMI consumption as the GRUU must be assigned to the SipPeerToPeerEndpoint class.

For more information about the following prerequisites, see Getting Started Building a Unified Communications Managed API version 1.0 Application.

  • Configure Office Communications Server to trust the application connection, and to treat traffic from the application as if it were from another server.
  • Create a certificate chain to trust the root, and import that certificate to the application host computer.
  • Create a certificate with the FQDN (fully qualified domain name) of the application host computer.

To run the sample
  1. In the Samples\Signaling\BroadcastIM directory of the UCMA v1.0 SDK directory, open the sample solution file.

  2. Add a reference to Microsoft.Rtc.Collaboration.dll, which is installed at the path %ProgramFiles%\Office Communications Server 2007\UCMA v1.0.

  3. To start debugging, press F5.

  4. In the BroadcastIM dialog box, in the OCS FQDN box, enter the fully qualified domain name of the Office Communications Server used for broadcast operations.

  5. In the Number of Connections box, enter a digit to specify the maximum number of connections the application will establish with Office Communications Server. The optimum number of connections for communications between an application server and Office Communications Server is four to six.

  6. In the Broadcast SIP URI box, enter the SIP URI which will be broadcast in the message's From header. The domain portion of the URI must match the default domain used by Office Communications Server so that notifications can be transmitted over federation links.

  7. Click one of the following:

    1. TCP, click Set, and then click New.
    2. TLS, select a client certificate from the drop-down list, click Set, and then click New.
  8. In the Notification dialog box, in the Notification box enter text for the message.

  9. In the Distribution Group Name box, enter the name of the distribution group receiving the message, and then click Send.

In the sample, a RealTimeServerConnectionManager class is created by casting from either a RealTimeServerTlsConnectionManager or RealTimeServerTcpConnectionManager class, depending on the user's choice. The SipPeerToPeerEndpoint class is used for both the TLS and TCP sides of the sample.

Show: