How can I integrate Lync 2010, with a program that does a DB look up and shows a small popup, with the information found, and also a few buttons with some options.
The program is already running with some other types of phone systems, I kind of need a connector for Lync.
I don't want to put a tab or other UI inside Lync.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You'll need to start with the Lync SDK. You can build your app as a Winforms or WPF app.
Signing In
To connect and sign in to the running instance of Lync, check out this page from the SDK. Make sure you keep a reference to the
LyncClient
object that represents Lync. This can be got by calling the static methodLyncClient.GetClient()
Detecting an incoming call
To detect an incoming call, you can listen for the
ConversationManager.ConversationAdded
event.ConversationManager
is a property on yourLyncClient
instance.To determine if the call is a) an Audio call, and b) incoming (as opposed to an outgoing call placed by the user) you can use the following method:
In the
ConversationAdded
event, you should sign up to theConversation.ParticipantAdded
event, so you can check who the caller is. The EventArgs object has aParticipant
property, which in turn has aContact
property. TheContact
property has a number of properties includingUri
, which should give you the phone number (if that's what you need).You can then make your DB call and pop your info.
Edit: I've written a blog post about screen pops which goes into much more detail - here
Placing a call
If your app is WPF, the easiest way to allow a call to be placed is by using the StartAudioCallButton control. Otherwise, the instructions here should help.