diff --git a/changelog.d/4621.bugfix b/changelog.d/4621.bugfix new file mode 100644 index 0000000000..2bc21e8f8e --- /dev/null +++ b/changelog.d/4621.bugfix @@ -0,0 +1 @@ +Fix for outgoing voip call via sip bridge failing after 1 minute. \ No newline at end of file diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt index 9fc84e6fe5..cda513e9d2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/model/MxCallImpl.kt @@ -203,8 +203,11 @@ internal class MxCallImpl( override fun selectAnswer() { Timber.tag(loggerTag.value).v("select answer $callId") - if (isOutgoing) return - state = CallState.Answering + if (!isOutgoing) return + // This is an outgoing call, select the remote client that answered. + if (state != CallState.Dialing) { + Timber.tag(loggerTag.value).w("Expected state is CallState.Dialing got $state.") + } CallSelectAnswerContent( callId = callId, partyId = ourPartyId,