Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Calls expose several events that can be useful to an application. For example, the StateChanged event is raised when the state of the call changes and the ConversationChanged event is raised when a new conversation is derived from the current conversation. A call will be moved to a derived conversation either when the remote participant of the call is different from the conversation’s remote participant or when the escalation operation fails to escalate all the established calls in the conversation. In the latter case, the calls for which the escalation operation failed will be moved to a derived conversation. Applications can use Reason to determine why the call was moved to a derived conversation.
Applications must register for any events of interest before a call is established.
The following code demonstrates registering an event handler for the StateChanged event on an instant messaging call and implementing a simple event handler for this event.
imCall.StateChanged += IMCall_StateChanged;
private void IMCall_StateChanged(object sender, StateChangedEventArgs<CallState> e)
{
}
The following code demonstrates registering an event handler for the StateChanged event on an audio/video call and implementing a simple event handler for this event.
avCall.StateChanged += AVCall_StateChanged;
private void AVCall_StateChanged(object sender, StateChangedEventArgs<CallState> e)
{
// Code for handling the StateChanged event.
}