Call delegation in Lync
Learn about the Microsoft Lync 2013 SDK class that lets your application handle audio calls delegated to the local Lync 2013 user.
Applies to: Lync 2013 | Lync Server 2013
In this article |
Lync 2013 call delegation
The two components of Lync 2013 call delegation are the Lync user who delegates calls and the Lync user who is delegated to receive audio calls. A user can be delegated to receive delegated calls from multiple delegators. When a delegated call is answered by a delegated user, the normal Lync 2013 conversation window is opened on the delegated user’s display. The conversation window displays text that indicates the call is answered on behalf of a delegator and includes the delegator’s name. The Microsoft Lync 2013 API object model lets you create delegated call behavior in your application so that your code can emulate the behavior of the client.
Delegated call object model
The API entry point for delegated calls is the Microsoft.Lync.Model.DelegatorClient class. DelegatorClient inherits Microsoft.Lync.Model.Client and provides a Microsoft.Lync.Model.Conversation.ConversationManager object that raises the ConversationManager.ConversationAdded event.
Tip |
---|
A DelegatorClient object exposes a Microsoft.Lync.Model.ContactManager object. Although the DelegatorClient represents the delegator user, the obtained ContactManger represents the local user and exposes the local user’s groups and contacts, not the delegator’s groups and contacts. |
The LyncClient.DelegatorClients property returns a collection of delegator client objects. The collection contains a DelegatorClient object for each call delegator who has delegated calls to the local user. Read the Client.Uri property on each DelegatorClient to get the URI of the Lync 2013 user who delegated calls to the local user. You should use this URI to get the Microsoft.Lync.Model.Contact object for the call delegator. Be sure to get the name of the delegator user from this Contact object so that you can display a note on your conversation window UI that informs the local user who they are answering delegated calls for.
When a call comes in on behalf one of the delegating users, the ConversationManager.ConversationAdded event is raised on the Microsoft.Lync.Model.Conversation.ConversationManager object provided by the corresponding DelegatorClient object. Be sure to register for this event on all instances of the delegator ConversationManager.
When you obtain the Microsoft.Lync.Model.Conversation.Conversation object for the delegated call, treat the call as a normal incoming audio call. You can accept or reject the call and then perform all of the audio call operations that you would for a non-delegated audio call. For information about handling conversations, see What you can do with Lync conversations