Echo Bot - .NET V9.X Compatibility Issue
I am trying to bring up echobot in windows vm with .net9. After several days and hrs, I end up giving up. Is there a codebase thats works on .net v9 with latest frameworks and libs?
@yezk-code-cloud Please note there is a known incompatibility between the Microsoft.Skype.Bots.Media library and .NET 9, which causes the media library startup initialization to fail. Our next SDK release (hopefully by end of this month) will provide a fix. In the meantime, you will need to use .NET 8. Thanks.
@ssulzer, thank you for your response. I tried it with .NET 8 as well, even in there I see media library startup initialization failure. Is it possible to provide me the .csproj file that has all the necessary/compatible items to get this app up and running? Here is mine for your reference
@yezk-code-cloud We have just released a new media SDK that might be worth trying out - https://www.nuget.org/packages/Microsoft.Skype.Bots.Media/1.32.0.70-preview
If you are encountering an exception during initialization of the media SDK's MediaPlatform, please see if your exception error and/or call stack matches what is being discussed in this thread: https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/841
@ssulzer, thank you for the new version of the Bots.Media, with the newer version, I am able to get the server up and running.. When try to make the bot join the meeting via POST request, I could get successful response. But, I dont see the BOT in the meeting, upon looking at the logs, I feel the BOT is getting kicked out immediately. Here is the summary,
What's Working:
- ✅ Media platform initializes successfully - All components load properly
- ✅ Bot receives join request - POST to /calls endpoint processes correctly
- ✅ Media sessions created - Audio/video sockets and media configuration established
- ✅ Two notification callbacks received - Teams sends notifications to /api/calling/notification
The Problem: The critical issue is in the metrics: TotalBuffersReceived: 0
This means: • Bot joins the call technically • Media sessions are created • But no audio/video data is flowing • All buffer counts are zero (no audio received, no audio sent)
Why This Happens: The bot connects to the call infrastructure but doesn't receive any media streams because:
- Azure Bot Service calling permissions aren't configured
- Bot isn't visible in Teams meeting - participants can't see it
- Media streams aren't being routed to the bot
The cleanup happens because Teams terminates the connection when no media flows after the initial handshake. The bot successfully joins at the protocol level but fails to establish actual media streaming.
Here is the verbose log from server
I have all the app permissions given.. not sure whats still wrong. Requesting your help
@yezk-code-cloud There's some problem with the server SSL certificate your bot has provisioned, although I don't have enough diagnostic info to tell what is wrong. Is it a self-signed certificate? Those are not supported by the media SDK.
The other thing to check is that the certificate's subject name, or an entry in its SAN list, matches the bot's server domain name (the value given to MediaPlatformSettings.MediaPlatformInstanceSettings.ServiceFqdn). I don't think that is the problem in this case, but if the bot is hosted behind ngrok, it is worth checking.
@ssulzer , thank you for pointing out on the certification thing. I could get a cert from cert authority and could invite the bot to the meeting.. however, it doesnt appear on the meeting as wells as doesnt echo. Attaching the latest server logs, it shows that i could create media sessions. I got the teams app created and installed for my profile. Even then it doesnt join the meeting. Here is the server log. I think I got it working almost, but stuck on last few things. Requesting your input.
@yezk-code-cloud I see a different error now, but we might need to enable some extra logging on your bot to get more information. Can you please verify what version of Microsoft.IO.RecyclableMemoryStream you have installed with your bot?
I'm not the original poster, and am not using Echo Bot but can confirm that .net 9 works with the latest release (bot joins and has access to per participant streams):
[net9.0]:
Top-level Package Requested Resolved
> Azure.Identity 1.17.0 1.17.0
> Microsoft.Graph.Communications.Calls.Media 1.2.0.15533 1.2.0.15533
> Microsoft.Skype.Bots.Media 1.32.0.70-preview 1.32.0.70-preview
Is .net 9 officially supported now?
Hi @owennewo I would say it is supported but not thoroughly tested. Our own media bots are running on .net 8.
Hi @owennewo I would say it is supported but not thoroughly tested. Our own media bots are running on .net 8.
I dont have Microsoft.IO.RecyclableMemoryStream explicitly listed in the project file, Microsoft.IO.RecyclableMemoryStream is likely a transitive dependency of one of the Microsoft Graph Communications packages, am I right?
Curious to know where do you see the different error? I could not find any errors in the log :(
Also, please let me know what logs should be enabled.
@yezk-code-cloud Please just restart your bot and try a new test call. Thanks.
@ssulzer , i retried, no progress.. When i do post call to https://bot.mydomain.com:5001/calls, it returns 200 with below response payload { "callId": "-d90e--a123-", "scenarioId": "-d90e--a123-*", "threadId": "19:meeting_-d90e--a123-******************[email protected]", "port": "443" } but BOT is not joining the meeting nor echo-ing.
There's some exception occurring within the media SDK when our platform service tries to connect to your :8445 media control port, so the bot was never connected to the Teams call/meeting. Possibly some runtime dependency conflict, but I cannot tell (the extra logging didn't help much). I'll have to consult with an engineer on my side; we'll likely ask you to try some additional test calls.
Is it possible you can run the bot under a debugger and break on first chance .NET exceptions thrown (after the bot process starts up but just before when you try to join it to a meeting)?
The other thing I noticed is that immediately after the attempt to connect to your bot media SDK fails, we try to send a Graph Comms notification to your bot.domain.ai:443 to report a "Server Internal Error. DiagCode: 500#1203002" error diagnostic, but this connection attempt fails: System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.
Is the bot app possibly crashing during the meeting join attempt? This seems to be likely happening.
Please check what version of Microsoft.IO.RecyclableMemoryStream you have installed with the bot app (it is a transitive dependency). To be certain, add a reference to that library, version 3.0.1.