3
我开发了一个使用Lync API的Windows应用程序。我的客户想要禁止来电到这个应用程序。所以我添加了一些这样的东西。我能够切断电话,但也有能够做到这一点不允许传入呼叫Lync Api或禁用传入呼叫的声音
private void ClientInitialized(IAsyncResult result)
{
try
{
//registers for conversation related events
//these events will occur when new conversations are created (incoming/outgoing) and removed
client.ConversationManager.ConversationAdded += ConversationManager_ConversationAdded;
client.ConversationManager.ConversationRemoved += ConversationManager_ConversationRemoved;
}
catch (Exception ex)
{
MessageBox.Show("Problem in adding/removing conversation", "Bella IVIS", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
void ConversationManager_ConversationAdded(object sender, ConversationManagerEventArgs e)
{
try
{
var _client = client;
if (e.Conversation.State == ConversationState.Active)
{
for (int intLoop = 0; intLoop < _client.ConversationManager.Conversations.Count; intLoop++)
{
_client.ConversationManager.Conversations[intLoop].End();
}
_client = null;
return;
}
}
}
ConversationAdded是在对话添加后。您想在添加对话之前查看以确定在完成添加之前将其完全阻止/静音 – user3036342 2014-12-04 12:19:49
是否有任何要查找的事件名称 – Vivekh 2014-12-04 12:24:13
这是特定于此客户端(端点)还是用户?如果是用户,您可以关闭服务器端用户的audiovideo功能。旧文章可能仍然是相关的:http://jackiechen.org/2012/02/13/disable-audiovideo-features-in-lync-client/ – 2014-12-04 19:13:08