Skip to content

SDK v1.2.2 - Do Not Disturb Control API

Latest

Choose a tag to compare

@feelautom feelautom released this 18 Feb 19:46
· 2 commits to main since this release

This update exposes the Do Not Disturb (DND) state to the plugin layer, enabling
commercial plugins to build schedule-based availability systems, CRM presence sync,
or any workflow that requires controlling call rejection programmatically.

🆕 What's New

📵 DND Control API (IPluginSipService)

Plugins can now read, write, and observe the Do Not Disturb state.

New property:

bool IsDndEnabled { get; set; }
Read the current DND state or activate/deactivate it directly from your plugin.

New event:
event Action<bool>? OnDndChanged;
Subscribe to be notified whenever the DND state changes — whether triggered by the user
or by another plugin.

⚠️ Commercial only: Setting IsDndEnabled is restricted to Commercial-licensed
plugins. Community plugins have read-only access.

🛠️ Testing Library

MockSipService (SipLine.Plugin.Testing) now fully implements IsDndEnabled and
OnDndChanged, allowing you to simulate DND transitions in unit tests:

var mock = new MockPluginContext();
mock.SipService.IsDndEnabled = true;
// OnDndChanged fires automaticallyChecklist

- IPluginSipService extended with IsDndEnabled + OnDndChanged
- MockSipService updated for full testability
- Commercial plugin gate enforced in host adapter
- SipLine.Plugin.Dnd schedule plugin built on this API (available separately)