简体   繁体   中英

How do I test a calling/meeting bot locally in MS Teams?

I have used this yeoman generator to generate an app and a bot.

I have registered the bot with the bot framework and added the MS teams channel and specified it should be a calling bot. I have also updated my app registration in azure and assigned it the Microsoft Graph permissions as outlined in this document.

I have not modified the bot at all, all I have is what is generated from the generator. When I deploy my bot in MS teams (just a developer license) I can have a conversation with the bot and get responses but how do I test the calling/meeting functionality?

Ideally what I want, is a meeting bot that will listen for meetings starting, ending and people joining. I believe this is possible but I don't know how to test it locally.

Edit - including sample manifest.json produced by generator:

{
  "$schema": "https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json",
  "manifestVersion": "devPreview",
  "id": "{{APPLICATION_ID}}",
  "version": "{{VERSION}}",
  "packageName": "{{PACKAGE_NAME}}",
  "developer": {
    "name": "sample",
    "websiteUrl": "https://{{HOSTNAME}}",
    "privacyUrl": "https://{{HOSTNAME}}/privacy.html",
    "termsOfUseUrl": "https://{{HOSTNAME}}/tou.html"
  },
  "name": {
    "short": "calling-bot-test",
    "full": "calling-bot-test"
  },
  "description": {
    "short": "TODO: add short description here",
    "full": "TODO: add full description here"
  },
  "icons": {
    "outline": "icon-outline.png",
    "color": "icon-color.png"
  },
  "accentColor": "#D85028",
  "configurableTabs": [
    {
      "configurationUrl": "https://{{HOSTNAME}}/fstCallingBotTab/config.html?name={loginHint}&tenant={tid}&group={groupId}&theme={theme}",
      "canUpdateConfiguration": true,
      "scopes": [
        "team",
        "groupchat"
      ]
    }
  ],
  "staticTabs": [],
  "bots": [
    {
      "botId": "{{MICROSOFT_APP_ID}}",
      "needsChannelSelector": true,
      "isNotificationOnly": false,
      "scopes": [
        "team",
        "personal",
        "groupchat"
      ],
      "commandLists": [
        {
          "scopes": [
            "team",
            "personal"
          ],
          "commands": [
            {
              "title": "Help",
              "description": "Shows help information"
            }
          ]
        }
      ],
      "supportsCalling": true,
      "supportsVideo": true
    }
  ],
  "connectors": [],
  "composeExtensions": [],
  "permissions": [
    "identity",
    "messageTeamMembers"
  ],
  "validDomains": [
    "{{HOSTNAME}}"
  ]
}

I would recommend ngrok which is the same application that Microsoft recommends as well. It's simple and free. The only reason you would need the paid version of ngrok is if you need real time media support which is not likely for most people.

UPDATE: You asked specifically about testing the "meeting component"... I assume you mean call bot support for meetings?

This is not something you can "test" without code changes.

Call bots support:

  • Inbound 1 to 1 calls
  • Outbound 1 to 1 calls
  • Outbound multi-party calls

Ready the overview section careful and it goes over all of this.

You test inbound 1 to 1 calls by setting up your bot manifest to say it support calling . When the bot app is installed onto a teams client you should see a call button on the bot page that you can "call" the bot with. That is how you do a inbound 1 to 1 call.

To test outbound 1 to 1 calls / multi-party calls, your bot code need to generate a outbound call based on some sort of trigger you make up.

Maybe it's better if you go through thesample applications and get them up and running and see how they work. If you play with them and understand what they are doing then that will answer your "how to" questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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