Share via


Modify Conference Information

After scheduling a conference on the Office Communications Server Focus Factory module, you can update conference attributes for the scheduled conference. Users joining the conference after a conference is modified are affected by the changes.

Updating a conference on a Focus Factory involves requesting an object representing the interested conference from Office Communications Server, updating or adding property values on the object, and posting the updated object back to the server.

To modify a scheduled conference, the local client must obtain the IUccConferenceInformation object representing the conference to be modified. Using the conference manager session, the client can get a single conference information object with the conference ID of the desired conference. The client can also get a list of all unexpired conferences that the local user has scheduled by making a call into GetConferenceList on the IUccConferenceManagerSession. The client makes the desired changes in the IUccConferenceInformation object and calls ModifyConference to post those changes to the Focus Factory.

Modifiable Conference Data

The following list represents conference attributes that can be changed by the ModifyConference method:

  • PIN. This is the admission code for conferences with an admission type of UCCCAT_ANONYMOUS. Users already joined to an active conference are not affected by a modification to this value. Users joining or rejoining a conference must provide the new PIN.
  • Admission Type. Modifying this value only takes effect for users who initially join after the modification or users who leave and rejoin the conference after the modification.
  • Expiry Time. The conference expiration time takes effect for users who attempt to join or rejoin a conference after the new expiry time elapses.
  • Subject. Conference subject title changes are not visible to users currently joined to the active conference. Joining and rejoining users see the new conference subject.
  • Description. Conference description changes are not visible to users currently joined to the active conference. Joining and rejoining users see the new conference description.
  • Notification Data. The notification string sent to all newly joining participants.
  • Organizer Data. The conference state change notification sent to the conference organizer only. The conference organizer sees a modified notification after joining or rejoining an active conference.
  • MCU type requests. MCU types can be added to an active conference. Conference participants who join or rejoin see the added MCU. MCU removal from an active conference is not supported. A conference is deactivated when all participants leave the conference. MCU states such as UCCCESP_PRESENTATION_MODE or UCCCESP_DATA_MCU_COLLABORATION_MODE can only take effect if the MCU is restarted or a new instance of the conference is created.
  • Invitee List with Roles. A user can join a conference if she is on the invitee list. If her name is removed from the invitee list of an active conference, she cannot rejoin the conference. A changed participant role does not take effect for the participant until she leaves and rejoins the conference.

Obtaining a Conference List

After obtaining an IUccConferenceManagerSession interface, the local client must register for conference manager session events. The _IUccConferenceManagerSessionEvents interface must be implemented in the class that defines the associated callback functions. After event registration, a call to GetConferenceList is made. The following C# code snippet gets the conference manager session, advises for events, and makes a request to get a conference list. User Jay Adams at contoso.com is the local user. Each logged on user who can schedule conferences has a unique Focus Factory Uri. The local user's Focus Factory Uri is obtained in a query to the ServerConfiguration category. For more information, see Query Office Communications Server Configuration.

private IUccConferenceManager _confMgr;
private IUccConferenceManagerSession _confMgrSn;

// IUccServerConfigurationCategory serverConfiguration
// interface is obtained by cast from IUccCategoryInstance 
// received in serverConfiguration category

string focusFactoryURI = serverConfiguration.FocusFactory
_confMgr = _endpoint as IUccConferenceManager;
_confMgrSn = _confMgr.CreateConferenceManagerSession(focusFactoryURI);
UCC_Advise<_IUccConferenceManagerSessionEvents>(_confMgrSn, this);
try
{
    if (_confMgrSn != null)
    {
        _confMgrSn.GetConferenceList(null);
    }

}
catch (COMException CE)
{
    Console.WriteLine("COM Exception on GetAvailableMCUs " + CE.ErrorCode);
}
Handle Event

The OnGetConferenceList event returns a collection of conference information objects that can be modified and posted to the Office Communications Server Focus Factory module. The following C# code snippet reads the UCCCMOCEP_CONFERENCE_LIST property from the IUccOperationProgressEvent returned as the second argument to the callback function.

void _IUccConferenceManagerSessionEvents.OnGetConferenceList(
                              UccConferenceManagerSession pEventSource,
                              IUccOperationProgressEvent pEventData)
{
    IUccCollection myConferences;
    if (pEventData.StatusCode >= 0)
    {
        IUccReadOnlyPropertyCollection rp = pEventData.Properties;
        IUccProperty p = rp.get_Property(
         (int)UCC_CONFERENCE_MANAGER_OPERATION_COMPLETED_EVENT_PROPERTY
        .UCCCMOCEP_CONFERENCE_LIST);
        myConferences = p.Value as IUccCollection;
        if (myConferences != null && myConferences.Count > 0)
        {
            foreach (IUccProperty thisConference in myConferences)
            {
                IUccConferenceInformation ci = null;
                ci = thisConference.Value as IUccConferenceInformation;
                string confSubject = ci.Properties.get_Property((int)UCC_CONFERENCE_INFORMATION_PROPERTY.UCCCIP_SUBJECT).StringValue;
                if (confSubject.Trim().ToLower() == "Lunch Meetintg")
                { 
                   //do some work
                   break;
                }
            }
        }
    }
}

Obtaining a Single Conference

Obtaining a single conference involves calling GetConference on a conference manager session. The conference ID of the interested conference is passed to the method. The interested conference information object is returned with the OnGetConference event. The following C# code snippet illustrates this concept using a fictitious conference ID.

private IUccConferenceManager _confMgr;
private IUccConferenceManagerSession _confMgrSn;
string confId = "9EXXXXXXXXXXX"
_confMgr = _endpoint as IUccConferenceManager;
_confMgrSn = _confMgr.CreateConferenceManagerSession(focusFactoryURI);
UCC_Advise<_IUccConferenceManagerSessionEvents>(_confMgrSn, this);
try
{
    if (_confMgrSn != null)
    {
        _confMgrSn.GetConference(confId, null);
    }
}
Handle Event

The requested conference information object is returned asynchronously in the OnGetConference event. The following C# code illustrates how to obtain the IUccConferenceInformation object from the IUccOperationProgressEvent argument of the callback function.

void _IUccConferenceManagerSessionEvents.OnGetConference(
                              UccConferenceManagerSession pEventSource,
                              IUccOperationProgressEvent pEventData)
{
    if (pEventData.StatusCode >=0)
    {
            try
            {
                IUccProperty pCI = pEventData
                                  .Properties
                                  .get_Property(
                                  (int)UCC_CONFERENCE_MANAGER_OPERATION_COMPLETED_EVENT_PROPERTY
                                  .UCCCMOCEP_CONFERENCE_INFORMATION);

                IUccConferenceInformation ci = pCI.ObjectValue as IUccConferenceInformation;
            }
            catch (COMException ce)
            {
                Console.WriteLine(
                       "COM Exception:" 
                       + ce.ErrorCode.ToString());
            }
    }
}

Modifying a Conference on a Focus Factory

After obtaining an IUccConferenceInformation object by either of the previous methods, the properties of the conference can be updated. Any conference updates do not take effect for currently participating users. New participants or participants who leave and rejoin see updates made with ModifyConference. In this example, a user is being added to the conference invitee list. The user notification of the invitation is the responsibility of the local application.

    IUccPropertyCollection ciPC = ci.Properties;
    IUccPropertyCollection uPLC =    (IUccPropertyCollection)ciPC.get_Property(
    (int)UCC_CONFERENCE_INFORMATION_PROPERTY
    .UCCCIP_PARTICIPANTS).Value;

    //Add the participants
    IUccPropertyCollection pUser = new UccPropertyCollectionClass();
    pUser.AddProperty(
       (int)UCC_CONFERENCE_PARTICIPANT_PROPERTY.UCCCPPID_URI,
       "SIP:jessicaa@contoso.com");
    pUser.AddProperty(
       (int)UCC_CONFERENCE_PARTICIPANT_PROPERTY.UCCCPPID_ROLE,
       UCC_CONFERENCE_PARTICIPANT_ROLE.UCCCPR_PARTICIPANT);

    IUccCollection coll = uPLC as IUccCollection;
    int userCount = coll.Count;

    uPLC.AddProperty(userCount + 1, pUser);

    if (ci != null)
    {
        UccOperationContext newOC = new UccOperationContext();
        int lPropertId = 10;
        newOC.Initialize((int)lPropertId, null);
        _confManagerSession.ModifyConference(ci, newOC);
    }
Handle Event

The ModifyConference method call generates the OnModifyConference event. This event should be used to verify the success of the conference modification. This event is also a good place to call application code inviting the interested user to the conference. If the conference admission type is anonymous and an entry PIN is set, the application generated invitation should include the PIN and the conference Uri.

void _IUccConferenceManagerSessionEvents.OnModifyConference(
                              UccConferenceManagerSession pEventSource,
                              IUccOperationProgressEvent pEventData)
{
    IUccOperationProgressEvent progress = null;
    if (pEventData.StatusCode >= 0)
    {
        progress = pEventData as IUccOperationProgressEvent;

    }
    else
        Console.WriteLine("OnModifyConference" + pEventData.StatusText);
}

Modifying an Active Conference on a Focus

Modifying an active conference involves calling SetProperty on the active conference session object. Modifying properties on an active conference is a privilege limited to participants with the role of UCC_CONFERENCE_PARTICIPANT_ROLE.UCCCPR_ADMIN.

See Also

Concepts

Create a Conference Manager Session
Schedule a Conference
Cancel a Scheduled Conference