The ConferenceSessionclass implements the signaling functionality of a Centralized Conference Control Protocol (C3P) conference signaling session.

ConferenceSession State Transitions

The following illustration shows the possible state transitions on a ConferenceSessioninstance.

  1. The transition from Idleto Connectingoccurs when BeginJoinis called.

  2. The transition from Connectingto Connectedoccurs when the join process is complete. In the Connectedstate, ParticipantEndpointAttendanceChangedevents are raised for all existing participant endpoints in the Focus and MCUs before the callback method in the argument list of BeginJoinis called.

  3. The transition from Connectedto Terminatingoccurs when any of the following occur:

    • The application called BeginTerminateon the Conversationinstance.

    • The application called BeginTerminateConferenceon the ConferenceSessioninstance.

    • A local participant was ejected from the conference.

    • The conference was terminated.

    • The parent Conversationfailed an escalation attempt.

  4. The transition from Terminatingto Terminatedoccurs when the application calls BeginTerminateConferenceon the ConferenceSessioninstance. The termination process is complete. Signaling and subscription sessions with the Focus are terminated before this transition occurs.

  5. The transition from to Terminatingto Idleoccurs only when the parent Conversationhas failed an escalation attempt. Before the transition to Idleoccurs, ConferenceSessionstate is cleaned up and ParticipantEndpointAttendanceChangedevents are raised for all participant endpoints associated with this ConferenceSessionand its child McuSessionobjects.

  6. The transition from Connectedto Reconnectingoccurs if the front end that hosts the Focus has failed over. During this transition, all pending ConferenceSessionoperations fail. Any operation requested from ConferenceSessionafter its state changes to Reconnectingwill fail with a RealTimeInvalidOperationExceptionwith a failure reason of RetryableOperation.

  7. The transition from Reconnectingto Connectedoccurs when the reconnection process is successful. The Focus delivers a fresh roster that is compared to the existing roster information in ConferenceSessionand its McuSessionobjects. Events are raised if any differences are detected.

  8. The transition from Reconnectingto Terminatingoccurs if the reconnection attempt fails. Note that only one reconnection attempt is made.

  9. The transition from Connectingto Idleoccurs when the connection attempt fails, whereupon EndJointhrows an exception.

    Note:
    Conversationas currently implemented will begin terminating if an attempt to join a conference fails but the ConversationStateon the Conversationinstance is not Conferencing.

ConferenceSession Constructors

The ConferenceSessionclass has no public constructors.

ConferenceSession Properties

The following are the public properties on the ConferenceSessionclass.

Copy Code
// Gets conversation that holds this signaling session.
// For an outgoing session, the conversation is not available until
the session 
// is bound to a conversation. However, the conversation is
available on an incoming session 
// because it is already bound to a conversation by the time it is
exposed to the application.
public Conversation Conversation {get;}

// Gets the state of the conference.
public ConferenceSessionState State {get;}

// Gets whether a conference is locked.
public bool IsLocked {get;}

// Gets the source network of the conference being hosted.
public SourceNetwork HostingNetwork {get;}

// Gets the conference URI.
public string ConferenceUri {get;}

// Gets the XML data given to all clients when they join.
public string ParticipantData {get;}

// Gets or sets whether to join the conference as a trusted
application.
// An endpoint supporting privileged operations is required to join
as a trusted application.
// Trusted applications always join a conference as trusted leaders
and they are able to carry out privileged operations.
// A trusted application appears as a hidden participant in the
roster.
public bool IsTrustedJoin {get; set;}

// Gets the disclaimer that should be presented to the user prior
to joining.
// Some administrators may wish to configure a message that clients
can display before the join.
public string Disclaimer {get;}

// Gets the conference subject.
public string Subject {get;}

// Gets the instant messaging MCU session.
public InstantMessagingMcuSession InstantMessagingMcuSession {get;}

// Gets the audio video MCU session.
public Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoMcuSession
AudioVideoMcuSession {get;}

ConferenceSession Methods

The following are the public methods on the ConferenceSessionclass.

Copy Code
// Attempts to retrieve an McuSession of type T.
public bool TryGetMcuSession<T>(out T existingMcuSession)
where T : McuSession;

// Converts a ConferenceSession to its address for later rejoin.
public static implicit operator RealTimeAddress(ConferenceSession
session);

// Creates and joins a conference based on current conversation
media.
public IAsyncResult BeginJoin(AsyncCallback userCallback, object
state);

// Creates and joins a conference based on current conversation
media.
public IAsyncResult BeginJoin(
	ConferenceJoinInformation information,
	AsyncCallback userCallback, 
	object state);

// Waits for the pending asynchronous join operation to complete.
// The conference session state will transition to connected if the
join operation is successful. If unsuccessful, the conference
session 
// cleans up its state and transitions to idle.
// The join operation fails if the conference was locked and the
local participant was placed in conference lobby. 
public void EndJoin(IAsyncResult result);

// Terminates the conference and forces all participants to leave,
if performed by a conference leader.
// Otherwise it causes the participant to leave the conference.
// Conversation.Terminate is the preferred way to leave a
conference. 
public IAsyncResult BeginTerminateConference(
	AsyncCallback userCallback,
	object state);

// Gets the results from terminating the conference.
public void EndTerminateConference(
	IAsyncResult result);
   
// Removes a participant from the conference.
public IAsyncResult BeginEject(
	ConversationParticipant participant,
	AsyncCallback userCallback,
	object state);

// Waits for the pending operation to complete.
public void EndEject(
	IAsyncResult result);

// Locks a conference.
public IAsyncResult BeginLockConference(
	AsyncCallback userCallback,
	object state);

// Waits for the pending operation to complete.
public void EndLockConference(
	IAsyncResult result);

// Unlocks a conference.
public IAsyncResult BeginUnlockConference(
	AsyncCallback userCallback,
	object state);

// Waits for the pending operation to complete.
public void EndUnlockConference(
	IAsyncResult result);

// Changes the role of the participant in the conference.
public IAsyncResult BeginModifyRole(
	ConversationParticipant participant,
	ConferencingRole role,
	AsyncCallback userCallback,
	object state);

// Waits for the pending operation to complete.
public void EndModifyRole(
	IAsyncResult result);

// Gets the MCU address for the specified category.
public McuInformation GetMcuInformation(string mcuType);

// Returns a list of all remote participants.
public Collection<ParticipantEndpoint>
GetRemoteParticipantEndpoints();
 
// Returns a list of local participant endpoint on the Focus that
are waiting to be approved for entry in the conference.
public Collection<ParticipantEndpoint>
GetLocalParticipantEndpoints();

// Gets the properties for the given participant endpoint.
public bool TryGetParticipantEndpointProperties(
	ParticipantEndpoint endpoint,
	out ConferenceParticipantEndpointProperties properties);

// Returns a System.String that represents this object.
public override string ToString();

ConferenceSession Events

The following are the public events on the ConferenceSessionclass.

Copy Code
// Raised when participant endpoints join or leave the conference.
public event
EventHandler<ParticipantEndpointAttendanceChangedEventArgs<ConferenceParticipantProperties>>
ParticipantEndpointAttendanceChanged;

// Raised when a property changes on a participant endpoint.
public event
EventHandler<ParticipantEndpointPropertiesChangedEventArgs<ConferenceParticipantEndpointProperties>>
ParticipantEndpointPropertiesChanged;

// Raised when a property changes on the conference.
public event
EventHandler<PropertiesChangedEventArgs<ConferenceSessionProperties>>
PropertiesChanged;

// Raised when session state changes.
public event
EventHandler<StateChangedEventArgs<ConferenceSessionState>>
StateChanged;