Office Communicator 使用 C# API 自动接受呼叫

发布于 2024-09-05 06:25:49 字数 1035 浏览 8 评论 0 原文

当有人呼叫“我”开始视频通话时,是否有办法自动接听使用 C# Api 编程的呼叫?

使用 API 启动视频通话很简单:

var contactArray = new ArrayList();
contactArray.Add("[email protected]");
object[] sipUris = new object[contactArray.Count];
int currentObject = 0;
foreach (object contactObject in contactArray)
{
    sipUris[currentObject] = contactObject;
    currentObject++;
}
var communicator = new Messenger();
communicator.OnIMWindowCreated += new DMessengerEvents_OnIMWindowCreatedEventHandler(communicator_OnIMWindowCreated);
IMessengerAdvanced msgrAdv = communicator as CommunicatorAPI.IMessengerAdvanced;
if (msgrAdv != null)
{
    try
    {
        object obj = msgrAdv.StartConversation(CommunicatorAPI.CONVERSATION_TYPE.CONVERSATION_TYPE_VIDEO, sipUris, null, "Conference Wall CZ - Conversation", "1", null);
    }
    catch (COMException ex)
    {
        Console.WriteLine(ex.Message);
    }
}

但另一方面我想自动接受此通话......

Is there a way to automatically accept calls programmed with the C# Api when someone calls 'me' to start a video call?

Starting a video call with the API is easy:

var contactArray = new ArrayList();
contactArray.Add("[email protected]");
object[] sipUris = new object[contactArray.Count];
int currentObject = 0;
foreach (object contactObject in contactArray)
{
    sipUris[currentObject] = contactObject;
    currentObject++;
}
var communicator = new Messenger();
communicator.OnIMWindowCreated += new DMessengerEvents_OnIMWindowCreatedEventHandler(communicator_OnIMWindowCreated);
IMessengerAdvanced msgrAdv = communicator as CommunicatorAPI.IMessengerAdvanced;
if (msgrAdv != null)
{
    try
    {
        object obj = msgrAdv.StartConversation(CommunicatorAPI.CONVERSATION_TYPE.CONVERSATION_TYPE_VIDEO, sipUris, null, "Conference Wall CZ - Conversation", "1", null);
    }
    catch (COMException ex)
    {
        Console.WriteLine(ex.Message);
    }
}

But on the other side i want to automatically accept this call....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对不⑦ 2024-09-12 06:25:50

据我所知,OC 是不可能的,大概是出于安全原因。我最终做的是让远程机器人给我打电话,然后我接听。因此,我与我有服务监听的消息帐户聊天“开始视频”。该服务给我打电话,然后我手动接听。

Not possible with OC so far as I've found, presumably for security reasons. What I ended up doing was having the remote bot call me then I answer. So I chat "start video" to a messenger account that I've got a service listening to. That service calls me, then I answer it on my side manually.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文