hnnh
hnnh

Reputation: 13

MS Teams Bot invite Call Queue as Participant

I have a communications bot on MS Teams. The idea is that a user can call this bot who will then invite an agent to the call after gathering some information on the caller. The bot has some other mediating roles so i would like for it to stay in the call. So far I have been able to invite regular users to the call but for applications, such as the call queue and auto attendant, I have been returned an 403 Error code. This is how I tried it.

        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
              }
            }
          }
        ],
      }

In this post Link it was mentioned that it might be possible to redirect an unanswered call to the queue, but I have not yet been able to reproduce this. Highly appreciate feedback.

Upvotes: 1

Views: 827

Answers (2)

maj
maj

Reputation: 26

For redirecting to auto attendants or call queues use the "applicationInstance" identity.

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
            }
        }
    }],
}

Edit: See the documentation of the request here: https://learn.microsoft.com/en-us/graph/api/call-redirect?view=graph-rest-beta&tabs=http#request

Upvotes: 1

Rama-MSFT
Rama-MSFT

Reputation: 145

You can try this approach:-

  • Create a web.config file at the root of the app directory.

  • Add the following code to 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>

Upvotes: 0

Related Questions