From 7cb8ca43f1742a55c1cda1834e98b9ff31713382 Mon Sep 17 00:00:00 2001 From: mechtech-mind Date: Fri, 25 Apr 2025 12:02:56 +0530 Subject: [PATCH] fix: persist 'ws_uri' in _saveSettings to enable proper registration --- example/lib/src/register.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/example/lib/src/register.dart b/example/lib/src/register.dart index 98b02fb4..c96332d7 100644 --- a/example/lib/src/register.dart +++ b/example/lib/src/register.dart @@ -127,6 +127,13 @@ class _MyRegisterWidget extends State _saveSettings(); currentUser.register(SipUser( + wsUrl: _wsUriController.text, + //this is the websocket url which was missing in the original code hence it + //was showing null in the register method of sip_user_cubit.dart and always + //redirected to 'wss://tryit.jssip.net:10443', present inside sip_ua_helper.dart + //161: uaSettings.webSocketUrl ?? 'wss://tryit.jssip.net:10443', + //this will help people trying out the example to register with the correct url + //without changing the code in sip_ua_helper.dart selectedTransport: _selectedTransport, wsExtraHeaders: _wsExtraHeaders, sipUri: _sipUriController.text,