Share via


Query Office Communications Server Configuration

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.

An Office Communications Server computer can be configured by an administrator to suit the needs of an organization. Many of these configuration values deal with various forms of conferencing. The local application must be able to retrieve these configuration values to successfully carry out a conference with Unified Communications Client API.

Configuration Properties and Methods

The following list of configuration values are available using the IUccServerConfigurationCategory interface. The values returned by this interface are static. Typically, Office Communications Server is configured for these values and rarely changes. You obtain the IUccServerConfigurationCategory interface by casting the IUccCategoryInstance interface into IUccServerConfigurationCategory.

Note

You must call the Query method for this category instance instead of Subscribe. Subscribing to server configuration is not supported by Office Communications Server and results in failure to receive category instance of any category context in the subscription.

Properties

  • FocusFactory. This value is used by the IUccConferenceManager class when instantiating an IUccConferenceManagerSession class. The Focus Factory persists scheduled conferences and provides bootstrapping information to a Focus component when a conference is activated. To schedule conferences, the conference manager session must have the URI of the Focus Factory.
  • IsDistributionGroupExpansionEnabled. Determines whether Office Communications Server supports distribution group expansion.
  • MeetingDisclaimer. Gets the disclaimer of a meeting. This configuration can be blank.
  • MrasUri. The URI of a media relay access server (MRAS) within an organization. The MRAS supports cross-firewall A/V streams used in conferencing.
  • OrganizationName.****Gets the name of the organization hosting Office Communications Server.
  • PC to PC Audio/Video Encryption. Gets the encryption scheme used for computer-to-computer audio and video calls.
  • Quality Metrics server URI. Used by the PublishSessionMetrics method to publish the quality metrics of the A/V streams in a conference. The Quality Metrics server URI is passed as the first argument to PublishSessionMetrics.
  • Unified Communications Location Profile. Get the Unified Communications location profile.
  • Voicemail server URI. Gets the URI of the voice mail server component.

Methods

These methods return a string URL value:

  • get_AddressBookServerUrl. Gets the URL of the address book server from which a user's address can be queried.
  • get_ConferenceTroubleshootingUrl. Returns the URL for troubleshooting a conference. It is NULL if the URL is not configured. The returned URL is a Web page requiring human interaction.
  • get_ConsoleInstallationUrl. Returns the URL for installing the meeting console. It is NULL if the URL is not configured.
  • get_DistributionGroupExpansionUrl. Returns the URL of a Web service dedicated to returning the URI for individual distribution group members. The returned URI can be used to query the presence of distribution group member users.

Query for the Category Instance

The following code example queries for the ServerConfiguration**category. Subscribing to the ServerConfiguration category is not allowed. You must use the Query method to receive the category instance in an OnCategoryInstanceAdded event.

  1. Create an IUccSubscription object by calling CreateSubscription on a subscription manager.
  2. Register for events on the subscription object.
  3. Add the ServerConfiguration category to the subscription.
  4. Create an IUccPresentity object for the local user and advise the event handler (the implementing class, this) to catch the OnCategoryInstanceAdded and other events defined in _IUccPresentityEvents and raised by the presentity.
  5. Add the presentity representing the local endpoint to the subscription.
  6. Query for the added category.
public void QueryConfiguration()
{
    try
    {
        //declare and instantiate subscription for server config.
        IUccSubscription subForConfig = subscriptionManager.CreateSubscription(null);

        //advise for events on new subscription
        UCC_Advise<_IUccSubscriptionEvents>( subForConfig, this);
        //add the server configuration category to the subscription
        subForConfig.AddCategoryName("ServerConfiguration");

        //add local user URI to subscription. 
        UccUri selfUri = uriMgr.ParseUri(uccpAppEndpoint.Endpoint.Uri.Value);
        IUccPresentity selfPresentity = subForConfig.CreatePresentity(selfUri.Value, null);
        UCC_Advise<_IUccPresentityEvent>( selfPresentity, this);
        subForConfig.AddPresentity(selfPresentity );

        //query for the server configuration category published by local user
        subForConfig.Query(null);
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.ToString());
    }
}

Handle OnCategoryInstanceAdded Event

The following C# example handles a self-subscription event, OnCategoryInstanceAdded. The IUccCategoryInstance interface is cast to IUccServerConfigurationCategory to access properties of the server configuration. In this example, the MRAS Uri is obtained.

void _IUccCategoryContextEvents.OnCategoryInstanceAdded(
    IUccCategoryContext source, 
    UccCategoryInstanceEvent data)
{
    IUccCategoryInstance c = data.CategoryInstance;
    switch (source.Name)
    {
        case "serverConfiguation":
           serverConfig = c as IUccServerConfigurationCategory;
           string MRASUri = serverConfig.MediaRelayAuthenticationServerUri.Value;
           break;
        default:
            break;
    }
    //Advise for category instance events to get future updates to category.
    UCC_Advise<_IUccCategoryInstanceEvents>(c, this);
}

See Also

Concepts

Query Category Instances