[FEATURE] Add CallStatusMessenger for interface-based devices - Mobile Control System Controller VideoCodecBase Refactor
Overview
This PR addresses the limitation where the Mobile Control System Controller required devices to inherit from VideoCodecBase to create codec-specific messengers, even when devices only needed basic call status functionality. This change enables devices that implement specific interfaces (like IHasDialer) to work with the mobile control system without requiring full VideoCodecBase inheritance.
Changes
New CallStatusMessenger
Created a new CallStatusMessenger class that:
- Accepts devices implementing
IHasDialerinterface instead of requiringVideoCodecBaseinheritance - Optionally supports
IHasContentSharingfor devices that implement both interfaces - Uses reflection to dynamically access
ActiveCallsproperty when available - Provides core call control actions: dial, end calls, accept/reject, DTMF
- Automatically detects and supports content sharing functionality
Updated MobileControlSystemController
Modified SetupDefaultDeviceMessengers() to implement either/or logic:
// Before: Only VideoCodecBase devices could use call status messaging
if (device is VideoCodecBase codec) { /* create VideoCodecBaseMessenger */ }
// After: Either VideoCodecBase OR IHasDialer devices can use call status messaging
if (device is VideoCodecBase codec) { /* create VideoCodecBaseMessenger */ }
else if (device is IHasDialer dialer && !messengerAdded) { /* create CallStatusMessenger */ }
Benefits
-
Backwards Compatibility: Existing
VideoCodecBasedevices continue to work unchanged -
Interface Flexibility: Devices can now implement just
IHasDialerfor call status messaging -
Minimal Dependencies: No need to inherit from
VideoCodecBasefor basic call control - Optional Features: Content sharing automatically detected and supported when implemented
-
Either/Or Logic: Devices get exactly one messenger - either
VideoCodecBaseMessengerorCallStatusMessenger
Testing
Both PepperDash.Essentials.MobileControl.Messengers and PepperDash.Essentials.MobileControl projects build successfully with no breaking changes. The implementation maintains full backwards compatibility while enabling the requested interface-based functionality.
Fixes #1309.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
crl.entrust.net
- Triggering command:
dotnet restore PepperDash.Essentials.4Series.sln(dns block)ocsp.entrust.net
- Triggering command:
dotnet restore PepperDash.Essentials.4Series.sln(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
@ngenovese11 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.
I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.