Skip to content

Expose registrator accessor for runtime REGISTER customization - #575

Closed
mechtech-mind wants to merge 2 commits into
flutter-webrtc:mainfrom
mechtech-mind:expose-registrator-access
Closed

Expose registrator accessor for runtime REGISTER customization#575
mechtech-mind wants to merge 2 commits into
flutter-webrtc:mainfrom
mechtech-mind:expose-registrator-access

Conversation

@mechtech-mind

Copy link
Copy Markdown
Contributor

What this PR does

This PR exposes a safe accessor for the internal Registrator instance so that
applications can modify REGISTER / UNREGISTER extra Contact parameters at runtime
without forking the library.

Why this is needed

Some applications (e.g. RFC8599 / push / call correlation use cases) need to add
dynamic Contact URI parameters at the moment of REGISTER, such as a runtime
UUID or call identifier.

Previously this was not possible without forking, because:

  • UA._registrator was private
  • SIPUAHelper had no way to reach the active registrator

Changes

  • Expose registratorInstance getter in UA
  • Expose registrator getter in SIPUAHelper
  • No behavior change, no breaking API changes

Usage example

sipHelper.registrator?.setExtraContactParams({
  'calluuid': uuid,
});
sipHelper.register();

Notes

  • Fully backward compatible
  • No changes to registration flow
  • Minimal surface-area change (2 files, 3 LOC)
  • This is an advanced-use feature intended for users familiar with the library
    internals, as the underlying capability already existed but was not exposed via
    the public plugin API.

Thanks!

Also feedback on additional test coverage or documentation improvements is welcome.

@mechtech-mind

Copy link
Copy Markdown
Contributor Author

Hi @cloudwebrtc 👋

Just a gentle follow-up on this PR when you have time.
This is a small, backward-compatible change that exposes an existing internal
capability for advanced use cases (runtime REGISTER Contact customization).

All checks are passing, and I’m happy to make any adjustments if needed.
Thanks for maintaining the project!

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.

1 participant