Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 13, 2025

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 IHasDialer interface instead of requiring VideoCodecBase inheritance
  • Optionally supports IHasContentSharing for devices that implement both interfaces
  • Uses reflection to dynamically access ActiveCalls property 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 VideoCodecBase devices continue to work unchanged
  • Interface Flexibility: Devices can now implement just IHasDialer for call status messaging
  • Minimal Dependencies: No need to inherit from VideoCodecBase for basic call control
  • Optional Features: Content sharing automatically detected and supported when implemented
  • Either/Or Logic: Devices get exactly one messenger - either VideoCodecBaseMessenger or CallStatusMessenger

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:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Contributor Author

Copilot AI commented Aug 13, 2025

@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.

Copilot AI and others added 2 commits August 13, 2025 21:14
…MobileControlSystemController

Co-authored-by: ngenovese11 <[email protected]>
…erify clean implementation

Co-authored-by: ngenovese11 <[email protected]>
Copilot AI changed the title [WIP] [FEATURE]-Mobile Control System Controller + VideoCodecBase Refactor [FEATURE] Add CallStatusMessenger for interface-based devices - Mobile Control System Controller VideoCodecBase Refactor Aug 13, 2025
Copilot AI requested a review from ngenovese11 August 13, 2025 21:17
Copilot finished work on behalf of ngenovese11 August 13, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]-Mobile Control System Controller + VideoCodecBase Refactor

2 participants