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]; } } 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