1

I have been asked to integrate a phone call note system into our new Lync based system. When a phone call is accepted the software should pop up a form to allow notes to be taken against the phone call.

I have found ways of loading the form when a phone call is received but not answered. Does anyone have any ideas how this can be achieved?

Currently using Lync 2010 SDK and C# Winforms.

Neo
  • 2,305
  • 4
  • 36
  • 70

2 Answers2

2

Conversation is added:

public event EventHandler<ConversationManagerEventArgs> ConversationAdded

Picking up a call:

e.Conversation.Modalities[ModalityTypes.AudioVideo].Accept();
LOZ
  • 1,169
  • 2
  • 16
  • 43
  • Wouldn't this auto answer the phone? Not exactly what I am looking for as they may reject the call – Neo Aug 08 '12 at 20:52
2

Subscribe to the StateChanged event of the AV modality:

 _conversation.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged += AVModality_StateChanged;

I can't remember exactly what state corresponds to an accepted call (I'm on my phone) but it ought to be easy to add some console output and play with it...

Hope that helps.

Tom Morgan
  • 2,355
  • 18
  • 29
  • Ok there is a state of connected which appears to be the one however when I add my form init in there, the form pops up but then hangs, the main form is still accessible and can be interacted with but the phone form that would be used to access the notes doesn't work. – Neo Aug 09 '12 at 08:58
  • Thanks this put me in the right direction, however there is another issue I have raised with another question http://stackoverflow.com/questions/11882401/showing-a-form-on-a-lync-connecting-event – Neo Aug 09 '12 at 11:29