-
Notifications
You must be signed in to change notification settings - Fork 269
Description
BotMedia SDK native media engine does not bind UDP port under .NET Framework 4.8
SDK Version: Microsoft.Skype.Bots.Media 1.31.0.225
Graph Communications SDK: Latest
OS: Windows Server (x64)
Runtime tested: .NET Framework 4.8 (fails), .NET 6 (works)
Summary
The BotMedia native media engine silently fails to initialize when hosted in a .NET Framework 4.8 process. The UDP media port is never bound, causing Teams to drop the call with DiagCode: 3003#7106 after ~4 seconds. The exact same configuration and code works correctly on .NET 6 on the same machine.
Reproduction Steps
- Take a working .NET 6 Teams compliance recording bot (Kestrel,
call.AnswerAsync(mediaSession)) - Port it to .NET Framework 4.8 using OWIN for HTTP hosting
- Keep identical
MediaPlatformSettings,AudioSocketSettings,CommunicationsClientBuilderconfiguration - Run and place a call
Observed Behavior
Signaling works correctly:
- Webhook received ✅
OnIncomingCallfires ✅CreateMediaSessionsucceeds ✅AnswerAsynccompletes without exception ✅state=establishingwebhook received ✅
But media never starts:
- UDP port is never bound by the media platform
- Teams drops call after ~4 seconds with
DiagCode: 3003#7106 AudioMediaReceivedevent never fires- 0 bytes recorded
Confirmed via UDP listener check immediately after builder.Build():
[DIAG] UDP 8445 is NOT bound - media platform silently failed!
[DIAG] All UDP ports bound by this process: (none in range 8000-9000)
Same check on .NET 6 version:
[DIAG] UDP 8445 IS bound on 0.0.0.0 - media platform OK
MediaPlatformSettings (identical in both versions)
var mediaPlatformSettings = new MediaPlatformSettings
{
ApplicationId = APP_ID,
MediaPlatformInstanceSettings = new MediaPlatformInstanceSettings
{
ServiceFqdn = "bot.example.com",
CertificateThumbprint = CERT_THUMBPRINT,
InstanceInternalPort = 8445,
InstancePublicIPAddress = IPAddress.Parse("x.x.x.x"),
InstancePublicPort = 8445,
}
};
var builder = new CommunicationsClientBuilder("PolicyRecordingBot", APP_ID, logger);
builder.SetAuthenticationProvider(authProvider);
builder.SetNotificationUrl(notificationUri);
builder.SetMediaPlatformSettings(mediaPlatformSettings);
builder.SetServiceBaseUrl(new Uri("https://graph.microsoft.com/v1.0"));
var client = builder.Build();Error Codes Observed
| Condition | DiagCode |
|---|---|
| UDP not bound (pure media failure) | 3003#7106 |
| SDK throws during answer processing | 500#1203003 |
The BotMedia SDK ships native C++ DLLs that appear to depend on the .NET Core runtime hosting APIs (coreclr.dll) for initialization. When loaded into a .NET Framework 4.8 process, the native media engine silently fails to start — no exception is thrown, no error is logged, but the UDP port is never bound and no media is processed.
Questions
- Is
Microsoft.Skype.Bots.Mediaofficially supported on .NET Framework 4.8, or is .NET Core / .NET 6+ a hard requirement? - Is there a supported way to host the BotMedia SDK inside a .NET Framework 4.8 process?
- If .NET Framework 4.8 is not supported, is out-of-process hosting (separate .NET 6 executable communicating via IPC) the recommended integration pattern for mixed-runtime environments?
- Is there any initialization API we should be calling explicitly to start the media platform that we may be missing?