diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b62f90e1..69b1b5e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Group changes to describe their impact on the project, as follows: ### Changed - Account EXPIRES is now set to 1 month instead of 1 year for sip.linphone.org accounts - Replaced voice recordings file name by localized placeholder text, like for video conferences invitations +- Decline incoming calls with Busy reason if there is at least another active call - Removed jetifier as it is not needed - Switched from gradle 7.5 to 8.0, requires JDK 17 (instead of 11) diff --git a/app/src/main/java/org/linphone/core/CoreContext.kt b/app/src/main/java/org/linphone/core/CoreContext.kt index f8c7e42d3..a482b4c8d 100644 --- a/app/src/main/java/org/linphone/core/CoreContext.kt +++ b/app/src/main/java/org/linphone/core/CoreContext.kt @@ -750,8 +750,13 @@ class CoreContext( call.redirectTo(voiceMailAddress) } } else { - Log.i("[Context] Declining call $call") - call.decline(Reason.Declined) + val reason = if (core.callsNb > 1) { + Reason.Busy + } else { + Reason.Declined + } + Log.i("[Context] Declining call [$call] with reason [$reason]") + call.decline(reason) } }