dart-sip-ua icon indicating copy to clipboard operation
dart-sip-ua copied to clipboard

Cannot Receive incoming call in windows

Open aditdiqdpratama opened this issue 4 years ago • 1 comments

Describe the bug throw expetion while receiving incoming call in windows

flutter: Lead Screen INFO: 2021-08-25 19:34:34.159861 call direction INCOMING
flutter: Lead Screen INFO: 2021-08-25 19:34:34.159861 incomming call
flutter: [2021-08-25 19:34:34.160] Level.debug rtc_session.dart:461 ::: answer()
flutter: [2021-08-25 19:34:34.162] Level.debug rtc_session.dart:1634 ::: createLocalDescription()
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Instance of 'InvalidStateError'
#0      RTCSession.answer
#1      Call.answer
#2      _LeadsScreenState._handleIncomingCall
#3      _LeadsScreenState.callStateChanged
#4      SIPUAHelper._notifyCallStateListeners.<anonymous closure>
#5      SetMixin.forEach (dart:collection/set.dart:142:30)
#6      SIPUAHelper._notifyCallStateListeners
#7      SIPUAHelper._options.<anonymous closure>
#8      EventManager.emit.<anonymous closure>
#9      List.forEach (dart:core-patch/growable_array.dart:403:8)
#10     EventManager.emit
#11     RTCSession._connecting
#12     RTCSession.answer
<asynchronous suspension>
flutter: Lead Screen INFO: 2021-08-25 19:34:34.257858 callStateChanged: CallStateEnum.STREAM
flutter: Lead Screen INFO: 2021-08-25 19:34:34.257858 call remote identity: 082113114647
flutter: Lead Screen INFO: 2021-08-25 19:34:34.258859 call direction INCOMING
flutter: Lead Screen INFO: 2021-08-25 19:34:34.259860 handle stream : local audio: null
flutter: MediaStreamTrack:enableSpeakerphone true
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method enableSpeakerphone on channel FlutterWebRTC.Method)
#0      MethodChannel._invokeMethod
<asynchronous suspension>
#1      MediaStreamTrackNative.enableSpeakerphone
<asynchronous suspension>
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getLocalDescription on channel FlutterWebRTC.Method)
#0      MethodChannel._invokeMethod
<asynchronous suspension>
#1      WebRTC.invokeMethod
<asynchronous suspension>
#2      RTCPeerConnectionNative.getLocalDescription
<asynchronous suspension>
#3      RTCSession._createLocalDescription.<anonymous closure>
<asynchronous suspension>
flutter: [2021-08-25 19:34:46.375] Level.debug websocket_interface.dart:168 ::: Received WebSocket message
flutter: [2021-08-25 19:34:46.377] Level.debug websocket_interface.dart:173 ::: Received and ignored empty packet
flutter: [2021-08-25 19:34:53.946] Level.debug rtc_session.dart:716 ::: terminate()
flutter: [2021-08-25 19:34:53.947] Level.debug rtc_session.dart:765 ::: rejecting session
flutter: [2021-08-25 19:34:53.948] Level.debug transport.dart:168 ::: send()
flutter: [2021-08-25 19:34:53.948] Level.debug websocket_interface.dart:130 ::: send()
flutter: [2021-08-25 19:34:53.949] Level.debug websocket_dart_impl.dart:49 ::: send:
SIP/2.0 408 RTP Timeout
Via: SIP/2.0/WSS 103.153.3.214:2790;rport;branch=z9hG4bKPj65946afb-810b-4c69-9c42-bce78625bf2f;alias
To: <sip:[email protected]>;tag=8811910354
From: <sip:082113114647@Brown-Lifepal>;tag=57040381-5cdc-48d8-a0eb-9713eaf0fced
Call-ID: 44c15f32-9958-473c-893d-db90bb5af972
CSeq: 27757 INVITE
Supported: timer,ice,replaces,outbound
Content-Length: 0
flutter: [2021-08-25 19:34:53.950] Level.debug rtc_session.dart:2942 ::: session failed
flutter: [2021-08-25 19:34:53.951] Level.debug rtc_session.dart:2945 ::: emit "_failed"
flutter: [2021-08-25 19:34:53.952] Level.debug rtc_session.dart:1476 ::: close()
flutter: [2021-08-25 19:34:53.953] Level.debug rtc_session.dart:2956 ::: emit "failed"
flutter: [2021-08-25 19:34:53.954] Level.debug sip_ua_helper.dart:208 ::: call failed with cause: Code: [408], Cause: Rejected, Reason: RTP Timeout
flutter: Lead Screen INFO: 2021-08-25 19:34:53.954727 callStateChanged: CallStateEnum.FAILED

To Reproduce Steps to reproduce the behavior:

  1. handle incoming call _call.answer(helper.buildCallOptions(true));

Expected behavior should handle incoming call

System Infomation() Flutter SDK Version: >=2.11.0 <3.0.0 Target OS and Version: windows 10 Host OS and Version: windows 10

Flutter Doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel dev, 2.5.0-6.0.pre, on Microsoft Windows [Version 10.0.19043.1081], locale en-ID) [X] Android toolchain - develop for Android devices X Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use flutter config --android-sdk to update to that location.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.1) [!] Android Studio (not installed) [√] VS Code (version 1.59.1) [√] Connected device (2 available)

aditdiqdpratama avatar Aug 25 '21 12:08 aditdiqdpratama

Hi @aditdiqdpratama, did you find any solution for above stated issue? If yes, could you please help me in fixing the same.

QualidUnissa avatar Aug 18 '22 12:08 QualidUnissa

it was work on last version > 0.5

aditdiqdpratama avatar Aug 19 '22 10:08 aditdiqdpratama