From 9b5bed96def37e2fdd2e71f35aa48e225435d166 Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Wed, 8 May 2024 22:35:41 +0800 Subject: [PATCH 1/3] fix log print. --- lib/src/event_manager/event_manager.dart | 4 ++-- lib/src/rtc_session.dart | 7 ++++--- lib/src/sip_ua_helper.dart | 5 +++-- lib/src/socket_transport.dart | 3 +-- lib/src/transports/tcp_socket.dart | 2 +- lib/src/transports/web_socket.dart | 2 +- lib/src/ua.dart | 4 ++-- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/src/event_manager/event_manager.dart b/lib/src/event_manager/event_manager.dart index 7fd8a9f6..aa84e7b0 100644 --- a/lib/src/event_manager/event_manager.dart +++ b/lib/src/event_manager/event_manager.dart @@ -69,7 +69,7 @@ class EventManager { targets.remove(listener); targets.add(listener); } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); } } @@ -108,7 +108,7 @@ class EventManager { // logger.w("invoking $event on $target"); target(event); } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); } } } diff --git a/lib/src/rtc_session.dart b/lib/src/rtc_session.dart index 6ec5fa1c..1de029d6 100644 --- a/lib/src/rtc_session.dart +++ b/lib/src/rtc_session.dart @@ -693,7 +693,8 @@ class RTCSession extends EventManager implements Owner { if (_status == C.STATUS_TERMINATED) { return; } - logger.e('Failed to answer(): ${error.toString()}', error, s); + logger.e('Failed to answer(): ${error.toString()}', + error: error, stackTrace: s); } } @@ -2295,7 +2296,7 @@ class RTCSession extends EventManager implements Owner { request_sender.send(); } catch (error, s) { - logger.e(error.toString(), error, s); + logger.e(error.toString(), error: error, stackTrace: s); _failed('local', null, null, null, 500, DartSIP_C.CausesType.WEBRTC_ERROR, 'Can\'t create local SDP'); if (_status == C.STATUS_TERMINATED) { @@ -2561,7 +2562,7 @@ class RTCSession extends EventManager implements Owner { 'eventHandlers': handlers }); } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); onFailed(); } } diff --git a/lib/src/sip_ua_helper.dart b/lib/src/sip_ua_helper.dart index ac2a4de8..f8fbaac0 100644 --- a/lib/src/sip_ua_helper.dart +++ b/lib/src/sip_ua_helper.dart @@ -105,7 +105,8 @@ class SIPUAHelper extends EventManager { _ua!.call(target, options); return true; } else { - logger.e('Not connected, you will need to register.', StackTraceNJ()); + logger.e('Not connected, you will need to register.', + stackTrace: StackTraceNJ()); } return false; } @@ -234,7 +235,7 @@ class SIPUAHelper extends EventManager { _ua!.start(); } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); } } diff --git a/lib/src/socket_transport.dart b/lib/src/socket_transport.dart index b6321723..49385603 100644 --- a/lib/src/socket_transport.dart +++ b/lib/src/socket_transport.dart @@ -130,8 +130,7 @@ class SocketTransport { if (!isConnected()) { logger.e( 'unable to send message, transport is not connected. Current state is $status', - null, - StackTraceNJ()); + stackTrace: StackTraceNJ()); return false; } diff --git a/lib/src/transports/tcp_socket.dart b/lib/src/transports/tcp_socket.dart index 1820edf5..a786a6e6 100644 --- a/lib/src/transports/tcp_socket.dart +++ b/lib/src/transports/tcp_socket.dart @@ -97,7 +97,7 @@ class SIPUATcpSocket extends SIPUASocketInterface { protocols: [_tcp_socket_protocol], tcpSocketSettings: _tcpSocketSettings); } catch (e, s) { - logger.e(e.toString(), null, s); + logger.e(e.toString(), stackTrace: s); _connected = false; logger.e('TcpSocket error: $e'); } diff --git a/lib/src/transports/web_socket.dart b/lib/src/transports/web_socket.dart index 9fd511ff..66123a00 100644 --- a/lib/src/transports/web_socket.dart +++ b/lib/src/transports/web_socket.dart @@ -108,7 +108,7 @@ class SIPUAWebSocket extends SIPUASocketInterface { protocols: [_websocket_protocol], webSocketSettings: _webSocketSettings); } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); _connected = false; logger.e('WebSocket $_url error: $e'); } diff --git a/lib/src/ua.dart b/lib/src/ua.dart index 20a932dc..9b213b32 100644 --- a/lib/src/ua.dart +++ b/lib/src/ua.dart @@ -335,7 +335,7 @@ class UA extends EventManager { rtcSession.terminate(); } } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); } } }); @@ -348,7 +348,7 @@ class UA extends EventManager { Subscriber subscriber = _subscribers[key]!; subscriber.terminate(null); } catch (e, s) { - logger.e(e.toString(), e, s); + logger.e(e.toString(), error: e, stackTrace: s); } } }); From a63230f73aa86112bf5c59ba1c7c73901633d1bc Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Wed, 8 May 2024 22:36:14 +0800 Subject: [PATCH 2/3] bump version flutter-webrtc. --- example/pubspec.yaml | 1 - pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index c93c5de2..748cafc6 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -25,7 +25,6 @@ dependencies: path: ../ shared_preferences: ^2.2.0 permission_handler: ^11.1.0 - flutter_webrtc: ^0.9.40 dev_dependencies: flutter_test: diff --git a/pubspec.yaml b/pubspec.yaml index 2fde5bca..8f05a405 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: collection: ^1.18.0 crypto: ^3.0.3 - flutter_webrtc: ^0.9.47 + flutter_webrtc: ^0.10.4 intl: ^0.19.0 logger: ^2.0.2+1 path: ^1.6.4 From c9b6f581b9389ed58df1520742ac3ad141f55e9c Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Wed, 8 May 2024 22:39:04 +0800 Subject: [PATCH 3/3] changlog. --- CHANGELOG.md | 14 ++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f518fd6..ef8386ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,20 @@ # Changelog -------------------------------------------- +[0.6.0] - 2024.05.08 + +* Add status code to CallState on the progress event by @hiratake55 in https://github.com/flutter-webrtc/dart-sip-ua/pull/374 +* expose rtc_session to/from-tag by @ftsef in https://github.com/flutter-webrtc/dart-sip-ua/pull/378 +* #376: Added `_settings.session_timers_refresh_method` to UaSettings t… by @komaxx in https://github.com/flutter-webrtc/dart-sip-ua/pull/377 +* expose instance_id by @VictorUvarov in https://github.com/flutter-webrtc/dart-sip-ua/pull/395 +* Example app cleanup by @VictorUvarov in https://github.com/flutter-webrtc/dart-sip-ua/pull/394 +* fix: parse expires from string header. by @cloudwebrtc in https://github.com/flutter-webrtc/dart-sip-ua/pull/396 +* Add support for UAConfiguration registrar_server by @VictorUvarov in https://github.com/flutter-webrtc/dart-sip-ua/pull/397 +* Feature/update dependency to intl v19 by @komaxx in https://github.com/flutter-webrtc/dart-sip-ua/pull/414 +* Tcp socket implementation by @mikaelwills in https://github.com/flutter-webrtc/dart-sip-ua/pull/416 +* feat: Adding extraHeaders in RegisterParams, exposing existing functionality via UaSettings() by @luan-evangelista in https://github.com/flutter-webrtc/dart-sip-ua/pull/432 +* add contact_uri as parameter by @pjalbuquerque in https://github.com/flutter-webrtc/dart-sip-ua/pull/426 + [0.5.8] - 2023.05.11 * Allow await on helper start call (#365) * Adding params support for sendMessage (#366) diff --git a/pubspec.yaml b/pubspec.yaml index 8f05a405..2c33cb07 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sip_ua -version: 0.5.8 +version: 0.6.0 description: A SIP UA stack for Flutter/Dart, based on flutter-webrtc, support iOS/Android/Destkop/Web. homepage: https://github.com/cloudwebrtc/dart-sip-ua environment: