Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions MatrixSDK/VoIP/MXCall.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Copy link
Contributor

@ismailgulek ismailgulek Jun 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep this state change before sending hangup.


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

Expand Down
1 change: 1 addition & 0 deletions changelog.d/1341.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MXCall: Hangup call with MXCallHangupReasonInviteTimeout reason when invite expires