-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hold not working #339
Comments
please update |
Could you provide more detail? |
We have the same problem with incoming calls. |
This appears to be a gracefully bye from the remote end. When does this occur specifically? |
On an incoming (answered) call, when you call |
I found the issue/crash: 08:55:30.702 I [2023-02-23 08:55:30.701] Level.debug rtc_session.dart:1011 ::: hold()
08:55:30.703 I [2023-02-23 08:55:30.702] Level.debug rtc_session.dart:2956 ::: session onhold
08:55:30.704 I [2023-02-23 08:55:30.703] Level.debug rtc_session.dart:2958 ::: emit "hold"
08:55:30.704 I WebRtcAudioRecordExternal: stopRecording
08:55:30.704 I WebRtcAudioRecordExternal: stopThread
08:55:30.705 I [2023-02-23 08:55:30.704] Level.debug sip_ua_helper.dart:254 ::: call hold
08:55:30.705 I _liveDataCall.direction: INCOMING
08:55:30.705 I callStateChanged: HOLD
08:55:30.705 I call: true
08:55:30.708 I [2023-02-23 08:55:30.705] Level.debug rtc_session.dart:2434 ::: sendReinvite()
08:55:30.709 I [2023-02-23 08:55:30.708] Level.debug rtc_session.dart:1606 ::: createLocalDescription()
08:55:30.710 I �[38;5;196m[2023-02-23 08:55:30.709] Level.error rtc_session.dart:1622 ::: emit "peerconnection:createofferfailed" [error:Null check operator used on a null value]�[0m
08:55:30.710 I �[38;5;196m[2023-02-23 08:55:30.710] Level.error rtc_session.dart:1685 ::: emit "peerconnection:setlocaldescriptionfailed" [error:LateInitializationError: Local 'desc' has not been initialized.]�[0m
08:55:30.711 E [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0 RTCSession._createLocalDescription (package:sip_ua/src/rtc_session.dart:1620:58)
#1 RTCSession._sendReinvite (package:sip_ua/src/rtc_session.dart:2503:17)
#2 RTCSession.hold (package:sip_ua/src/rtc_session.dart:1052:7)
#3 Call.hold (package:sip_ua/src/sip_ua_helper.dart:472:14)
#4 CallViewModel.holdOrUnholdActiveCall (package:flutter/view/call/call_view_model.dart:79:32)
#5 _CallState._buildDialerButtons.<anonymous closure> (package:flutter/view/call/call_screen.dart:142:26)
#6 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1096:21)
#7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
#8 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
#9 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
#10 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:239:7)
#11 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:615:9)
#12 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#13 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#14 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#15 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#16 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#17 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:460:19)
#18 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:440:22)
#19 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:336:11)
#20 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:395:7)
#21 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:357:5)
#22 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:314:7)
#23 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:295:7)
#24 _invoke1 (dart:ui/hooks.dart:164:13)
#25 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:361:7)
#26 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:31)
08:55:30.711 I �[38;5;196m[2023-02-23 08:55:30.711] Level.error rtc_session.dart:2532 ::: Bad state: Future already completed�[0m
08:55:30.711 I �[38;5;196m#0 _Completer.completeError (dart:async/future_impl.dart:15:31)
#1 RTCSession._createLocalDescription (package:sip_ua/src/rtc_session.dart:1688:17)
#2 RTCSession._sendReinvite (package:sip_ua/src/rtc_session.dart:2503:17)
#3 RTCSession.hold (package:sip_ua/src/rtc_session.dart:1052:7)
#4 Call.hold (package:sip_ua/src/sip_ua_helper.dart:472:14)
#5 CallViewModel.holdOrUnholdActiveCall (package:flutter/view/call/call_view_model.dart:79:32)
#6 _CallState._buildDialerButtons.<anonymous closure> (package:flutter/view/call/call_screen.dart:142:26)
#7 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1096:21)
#8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
#9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
#10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
#11 BaseTapGestureRecognizer.handlePrimaryPointer (p
08:55:30.712 I [2023-02-23 08:55:30.712] Level.debug rtc_session.dart:693 ::: terminate() |
Workaround: Map<String, dynamic>? constraints = {'': {}};
sipUaModel.liveDataCall?.answer({'rtcOfferConstraints': constraints}); |
Aight, seems I let something slip past in the Null rework that happened a while ago. Thank you for the trace, I should hopefully be able to fix it. |
@berger89 thanks the solution is working
|
I am trying to recreate this bug, but I am having no luck. The only null check operators in the _createLocalDescription method are all called on the _connection member. This one should however be initialized basically as soon as the call is created. Meaning, that I can't determine what is causing this issue using my setup. Therefore I would like to ask anyone having this issue, to create a minimal example that exhibits this behaviour. |
I have also experienced exactly the same problem as described by @berger89 and get the same stack trace (line and column). The work around @berger89 suggests does solve the problem (thanks) and seems to alter the messaging back to the server. Once the work around is present it does not send a SIP UPDATE message. I am also able to take the call back off hold which is good. However as soon as I have performed any hold operation it is only a matter of about 10 seconds before I get the following stack trace.
Then I've about another 10 seconds before a BYE is sent with:
being seen in the SIP message and the call is cut off. I did not seem to have these issues with the previous version. |
@melio-matt @berger89 Could the two of you please test if the issue is resolved by #351? |
Hi @Perondas I've test the fix and it cures the problem when pressing hold and I don't now have to use the workaround as suggested by @berger89. It also removes the second stack trace that I shared. thanks for sorting this. |
@melio-matt : Have you found any solution for RTP-Timeout issue, when putting the call on hold?I am also facing the same issue .
|
when updated to latest version from 0.5.2 to 0.5.3 my hold has stopped working its was not working in 0.5.1 so we updated to 0.5.2 but later on when i updated to 0.5.3 it again got the same issue.
The text was updated successfully, but these errors were encountered: