Quantcast
Channel: Lync 2010 and OCS - Lync Clients and Devices forum
Viewing all articles
Browse latest Browse all 3260

Lync Phones Disconnect Events are Firing when a call is answered

$
0
0

Im working with Lync client SDk 2013. I am trying to write a simple desktop application to determine when a call is Ringing, Answered, and Disconnected. I testing my application using Lync Desk phone (polycom phones). When i call my Lync phone, i get a "Notified" event, and when That call is answered, i get a "Disconnected" event.

privatestaticLyncClient _client;privatestaticvoidMain(){ _client =LyncClient.GetClient(); _client.ConversationManager.ConversationAdded+=ConversationManager_ConversationAdded; _client.ConversationManager.ConversationRemoved+=ConversationManager_ConversationRemoved;Console.ReadLine();}staticvoidConversationManager_ConversationAdded(object sender,ConversationManagerEventArgs e){ e.Conversation.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged+=Program_ModalityStateChanged;}staticvoidProgram_ModalityStateChanged(object sender,ModalityStateChangedEventArgs e){Console.WriteLine("Modality state changed "+String.Format("{0} => {1}", e.OldState, e.NewState));}staticvoidConversationManager_ConversationRemoved(object sender,ConversationManagerEventArgs e){//....some code.}

output from this code is

Modality state changed Disconnected => Notified

Modality state changed Notified=> Disconnected

I did come across few nice articles, but those don't seem to help me.http://blog.thoughtstuff.co.uk/2013/01/tracking-lync-conversations-in-code/

http://msdn.microsoft.com/en-us/library/office/hh345194(v=office.14).aspx

Is there any way to determine when the call is answered and disconnected?

Thanks


Viewing all articles
Browse latest Browse all 3260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>