I am developing a Microsoft Teams bot that should be able to join a call initiated from a Teams user. The goal is that when a user places a call to the bot inside Teams, the bot should join the call and handle the audio stream as described in Microsoft’s documentation for application-hosted media bots.
I am following the official Microsoft documentation: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/requirements-considerations-application-hosted-media-bots
And I am using the associated Microsoft sample from this GitHub repository: https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/LocalMediaSamples
The code builds successfully, but at runtime the bot does not receive the expected incoming call event when a Teams user tries to call it. Therefore, the bot never joins the call.
There are no compilation errors. The issue only happens during execution.
I have verified the following:
- The bot is registered correctly in Azure Active Directory.
The bot is added as an app inside Teams (via Developer Portal).
The messaging endpoint is reachable and validated in Azure Bot registration.
The Windows Server VM hosting the bot is reachable externally.
Required ports are open based on Microsoft documentation.
The sample configuration has not been modified except for the App ID and App Secret.
The Teams user placing the call is in the same tenant as the bot’s app registration.
Environment details:
Windows Server 2019 Datacenter (Azure VM)
.NET Framework 4.7.2 (used because sample requires it)
Visual Studio 2022
Public IPv4 assigned
All inbound rules configured as per documentation
Observed behavior:
The sample starts but shows runtime failures related to media initialization.
No incoming call event is received from Teams.
The bot never joins the call.
No error appears in Teams UI besides “not reachable.”
What I need help with:
Confirmation whether the application-hosted media sample is still expected to work with current Teams calling APIs.
Validation whether my configuration is correct based on the documentation.
Guidance on which network ports must be configured in 2024/2025 for media processing.
Clarification whether Windows Server 2019 is still a supported environment for this scenario.
Any known issues that may prevent the incoming call event from reaching the bot.
I will share any runtime logs or correlation IDs that support requests once the case is opened.
Thank you.