简体   繁体   English

获取 Microsoft Teams 的当前通话状态

[英]Get current call status of Microsoft Teams

On my Windows PC, I've installed the Microsoft Teams app.在我的 Windows 电脑上,我安装了 Microsoft Teams 应用程序。 I'd like to find out with an appropriate API whether I'm actually in a call and whether my microphone within a call is muted or not.我想通过合适的 API 了解我是否真的在通话中,以及通话中的麦克风是否静音。

So my questions are:所以我的问题是:

  1. How can I find out whether I'm currently in a call?如何确定我当前是否在通话中?
  2. What is the current microphone state within a call (muted / unmuted)?通话中的当前麦克风 state 是什么(静音/非静音)?

A little bit of background: I want to implement a little .NET Core service that polls for these information in the background.一点背景知识:我想实现一点 .NET Core 服务,在后台轮询这些信息。

  1. You can get user status using Graph API presence request, in response body you will get status.您可以使用Graph API 状态请求获取用户状态,在响应正文中您将获得状态。

    GET https://graph.microsoft.com/v1.0/me/presence获取https://graph.microsoft.com/v1.0/me/presence

Response:回复:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1574

{  
    "id": "fa8bf3dc-eca7-46b7-bad1-db199b62afc3",
    "availability": "Available",
    "activity": "Available"
}
  1. To know current microphone state within a call (muted / unmuted) is not possible.要知道当前的麦克风 state 在通话中(静音/取消静音)是不可能的。

There is a get participant API to get microphone state but for this you need to create a calling bot in teams, create a call in that bot and then from created call using call ID you can get participant microphone state using GET https://graph.microsoft.com/v1.0/communications/calls/{id}/participants/{id} There is a get participant API to get microphone state but for this you need to create a calling bot in teams, create a call in that bot and then from created call using call ID you can get participant microphone state using GET https://graph.microsoft.com/v1.0/communications/calls/{id}/participants/{id}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM