I am implementing an application using Lync Client API 2010 which will allow user to accept/decline an IM/audio/video Lync conversation through it instead of through the Lync Client Window. I can have the application works as expected in most cases except the following scenario:
- Let's assume account LyncA start an audio call with account LyncB
- My application (installed at the PC running the LyncB account) detects a new lync conversation is created on LyncB account through the ConversationAdded event.
- Click on the Accept button on My application to accept the call from LyncA (My application then will call the BeginConnect of the AudioVideoModality). Everything works as expected. LyncB accepts the audio call from LyncA.
- LyncA clicks on the Video button on Lync Window to add video to the conversation.
- LyncB detects that and automatically show up the video window without any user interaction and the Video channel starts the transfer.
- Now, click the End Video button on Lync Window of LyncB to end the video transfer from LyncA. The video is stopped but the audio call still continues.
- Now, LyncA clicks on the Video button on Lync Window again to add video back to the conversation.
- At this time, LyncB is popped up with a "Accept/Decline" message box to ask for user permission in accepting or declining the video transfer. My application detects this through the event ActionAvailabilityChanged of the AudioVideoModality. However, My Application can not use the Lync API 2010 to accept the video transfer at this time. I have tried the Accept method in the AudioVideoModality as well as the BeginConnect method. Also tried the BeginStart of the VideoChannel in the AudioVideoModality but still could not accept the incoming video transfer. When calling the BeginConnect method, it threw the exception UnauthorizedAccessException.
Does anyone else encounter the same issue here? It's really appreciated if you can provide me some hints on solving this.
Thanks.