OfficeDev / Microsoft-Teams-Samples

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
MIT License
1.03k stars 789 forks source link

Recording Bot unable to join the meeting #1266

Open pavankalyan066 opened 6 months ago

pavankalyan066 commented 6 months ago

Overview: I have created a Teams application where it uses Bot service, get the audio of participants and transcribe it.

Issue: Trying to debug the application in local, but Bot is unable to join the call that uses ngrok domain to tunnel the request to local machine and join call API is response is 200

The same domain URL is being configured in the Teams calling channels of the Bot.

Tested it using old, new and web based Teams clients. but same issue. exists.

Sample Curl Request: curl --location 'https://{domainname}.ngrok.io/joinCall/' \ --header 'Content-Type: application/json' \ --data-raw '{"JoinURL":{teams meeting URL}'

Sample Response:

{
    "callId": "471f5700-1882-40ad-bf98-03858f3481e3",
    "scenarioId": "bfd82217-e8b7-4c7e-9174-383895227fc1",
    "call": "{doaminname}.ngrok.io/calls/471f5700-1882-40ad-bf98-03858f3481e3"
}

Unable to understand where does the error occurs, Could some one help me to fix it so that Bot joins the meeting.

Dinesh-MSFT commented 6 months ago

Hi @pavankalyan066 - Thanks for raising the query. We will look into it and let you know the updates.

Dinesh-MSFT commented 6 months ago

Hi @pavankalyan066, Your bot is facing issues joining a meeting via an ngrok tunnel to your local machine. This could be due to your ngrok setup and how the bot handles call signaling events. Here’s how to fix it:

Update ngrok for TCP Tunnels: Ensure ngrok is configured for TCP tunnels, which calls and meeting bots use. Update the ngrok.yml file accordingly. Check Bot Messaging Endpoint: Make sure the bot’s messaging endpoint uses the correct ngrok URL in the Bot Framework portal. Verify Bot Configuration in Teams: Confirm that the ngrok domain URL is correctly set in the Teams calling channels. Debugging: Review ngrok logs for errors. Monitor network requests and responses. Use tools like Postman or curl to test the bot’s join call API endpoint. Update Bot Endpoint in App Manifest: If deploying to a different environment, update the ngrok URL in the Teams app manifest. Consider End-to-End Encryption: For security, consider a paid ngrok account for encrypted communication. Example ngrok.yml Configuration:

tunnels:
 signaling:
   addr: 12345
   proto: http
 media:
   addr: 8445
   proto: tcp

Replace port numbers and protocols as needed. Follow these steps to resolve the bot’s meeting join issues. For detailed setup and troubleshooting, refer to the Microsoft Teams documentation https://learn.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/calls-meetings-bots-overview.

pavankalyan066 commented 5 months ago

Hi @Dinesh-MSFT,

I have verified the ngrok for TCP Tunnels, Bot Configuration in Teams, ngrok domain URL is correctly set in the Teams calling channels and 200 response from bot’s join call API endpoint, Bot Endpoint in updated in App Manifest.

The domain which is configured in the ngrok, does it require wild card certificate or not, because in the past, we had a domain with wild card certificate and installed the in system for the local debugging which was working fine.

Something is blocking Bot from joining the meeting, Not able to figure it out.

Any help would be great.

pavankalyan066 commented 4 months ago

Hi @Dinesh-MSFT, Any update related to the issue.

Any other way to debug in local,

Thank you.

sayali-MSFT commented 1 month ago

Hello @pavankalyan066 - I hope you're doing well. My apologies for the delay in getting back to you. We are checking with the engineering team to see if there are any other ways to debug and will let you know once we have an update. Thank you for your patience.