1

我在 MS Teams 上有一个通信机器人。这个想法是用户可以呼叫这个机器人,然后在收集有关呼叫者的一些信息后邀请代理加入呼叫。该机器人还有其他一些调解角色,所以我希望它留在通话中。到目前为止,我已经能够邀请普通用户加入通话,但对于呼叫队列和自动助理等应用程序,我收到了 403 错误代码。这就是我尝试的方式。

        const requestConfig = {
        "headers": {
            'Authorization': `Bearer ${accessToken}`
        }
    }

    const requestBody = {
        "participants": [
          {
            "@odata.type": "#microsoft.graph.invitationParticipantInfo",
            "identity": {
              "@odata.type": "#microsoft.graph.identitySet",
              
              "application": {
                "@odata.type": "#microsoft.graph.identity",
                "displayName": "Call Queue",
                "id": queueId
              }
            }
          }
        ],
      }

在这篇文章链接中提到,可以将未应答的呼叫重定向到队列,但我还没有能够重现这一点。非常感谢反馈。

4

2 回答 2

1

对于重定向到自动助理或呼叫队列,请使用“applicationInstance”身份。

const requestBody = {
    "targets": [{
        "@odata.type": "#microsoft.graph.invitationParticipantInfo",
        "identity": {
            "@odata.type": "#microsoft.graph.identitySet",

            "applicationInstance": {
                "@odata.type": "#microsoft.graph.identity",
                "displayName": "Call Queue",
                "id": queueId
            }
        }
    }],
}

编辑:在此处查看请求的文档:https ://docs.microsoft.com/en-us/graph/api/call-redirect?view=graph-rest-beta&tabs=http#request

于 2021-01-12T12:09:19.217 回答
0

您可以尝试这种方法:-

  • 在 app 目录的根目录下创建一个 web.config 文件。

  • 将以下代码添加到 web.config。

<system.webServer>

<!-- indicates that the index.js file is a node.js application 
to be handled by the iisnode module -->

<handlers>
  <add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>

<!-- adds index.js to the default document list to allow 
URLs that only specify the application root location, 
e.g. http://mysite.antarescloud.com/ -->

<directoryBrowse enabled="true" />

</system.webServer>

于 2021-01-08T07:20:56.160 回答