From aa29f11dd7f82592330c3eb4a92522915796a85b Mon Sep 17 00:00:00 2001 From: ferologics Date: Fri, 21 Jan 2022 15:24:42 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Hangup=20call=20with=20MXCal?= =?UTF-8?q?lHangupReasonInviteTimeout=20reason=20when=20inivte=20expires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MatrixSDK/VoIP/MXCall.m | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/MatrixSDK/VoIP/MXCall.m b/MatrixSDK/VoIP/MXCall.m index d4a269a991..6c2364ca97 100644 --- a/MatrixSDK/VoIP/MXCall.m +++ b/MatrixSDK/VoIP/MXCall.m @@ -1672,25 +1672,12 @@ - (void)expireCallInvite if (inviteExpirationTimer) { + [inviteExpirationTimer invalidate]; inviteExpirationTimer = nil; + } - if (!_isIncoming) - { - // Terminate the call at the stack level we initiated - [callStackCall end]; - } - - // Send the notif that the call expired to the app - [self setState:MXCallStateInviteExpired reason:nil]; - - // Set appropriate call end reason - _endReason = MXCallEndReasonMissed; - - // And set the final state: MXCallStateEnded - [self setState:MXCallStateEnded reason:nil]; - - // The call manager can now ignore this call - [callManager removeCall:self]; + if (!_isIncoming) { // hang up on the side of the caller (call initiator) + [self hangupWithReason: MXCallHangupReasonInviteTimeout]; } } From 068fe80c4919ad12895fbf8c28c1d967dcaab573 Mon Sep 17 00:00:00 2001 From: ferologics Date: Fri, 21 Jan 2022 15:32:07 +0100 Subject: [PATCH 2/2] Add CHANGELOG --- changelog.d/1341.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1341.bugfix diff --git a/changelog.d/1341.bugfix b/changelog.d/1341.bugfix new file mode 100644 index 0000000000..eafbed66ac --- /dev/null +++ b/changelog.d/1341.bugfix @@ -0,0 +1 @@ +MXCall: Hangup call with MXCallHangupReasonInviteTimeout reason when invite expires