Share via


Providing Session Call Control

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.

Audio, and audio/video sessions can be treated as if they were telephone calls on a PBX. That is, they can be held, un-held, and transferred between individual endpoints. A transfer is made with the restriction that the media capabilities of the receiving endpoint limit the media types that are transferred. An endpoint with a UC phone and webcam can transfer an audio/video call to a proxy endpoint with an audio-only PSTN phone but the video media channel is removed from the session participants channel collection when the transfer is accepted. A custom Unified Communications Client API client must be able to handle incoming session transfer events and originating such operations. To handle such session call control events, the _IUccSessionCallControlEvents dispinterface must be implemented in client application logic.

Obtain Session Call Control Interface

The first step in registering for session call control events is to cast the IUccSession object to the IUccSessionCallControl interface. This should be done in the case where the local application originates a new session or receives a session from a remote user using the OnIncomingSession event.

Important

An incoming IM or application session cannot be subjected to call control even though a cast of an IM session to the session call control interface does not fail.

Obtaining a session call control interface is done by either a casting operation in C# or calling to QueryInterface in C++.

//_session is type: IUccSession
IUccSessionCallControl pSessionCC = _session as IUccSessionCallControl;

Advise Session Call Control Object of Implemented Event Handlers

When the session call control interface is obtained, a call to an advise method is made naming the dispinterface to be advised for and the class object that is to handle the events. The example calls a generic function whose Type parameter is specified as _IUccSessionCallControlEvents. The first argument of the method is the session call control object raising the event. The second argument is the class that implements the dispinterface. The out parameter argument supplies an integer that is used by application logic when the dispinterface is unadvised. For a code listing of the Advise wrapper function used in this example, see Code Listing: Basic Event Registration and Other Helper Methods in C#.

UCC_Advise<_IUccSessionCallControlEvents>(this.pSessionCC, this);

In This Section

Accepting a Transferred Session

Holding and Transferring Sessions

See Also

Concepts

Code Listing: Basic Event Registration and Other Helper Methods in C#
Handling Session Invitations