From 87ce79bc20b050c8fdca9b529b2014b3c2b539f6 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Tue, 21 Apr 2026 11:45:35 +0300 Subject: [PATCH] Added CAPABILITY_MERGE_CONFERENCE and CAPABILITY_SWAP_CONFERENCE to BaresipConnection --- .../kotlin/com/tutpro/baresip/ConnectionService.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/ConnectionService.kt b/app/src/main/kotlin/com/tutpro/baresip/ConnectionService.kt index 05ede35b..5c441614 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/ConnectionService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/ConnectionService.kt @@ -51,7 +51,10 @@ class ConnectionService : ConnectionService() { val connection = BaresipConnection(uap, callp) connections[callp] = connection connection.setAddress(Uri.fromParts("sip", peerUri, null), TelecomManager.PRESENTATION_ALLOWED) - connection.connectionCapabilities = Connection.CAPABILITY_SUPPORT_HOLD or Connection.CAPABILITY_HOLD + connection.connectionCapabilities = Connection.CAPABILITY_SUPPORT_HOLD or + Connection.CAPABILITY_HOLD or + Connection.CAPABILITY_MERGE_CONFERENCE or + Connection.CAPABILITY_SWAP_CONFERENCE val call = Call.ofCallp(callp) if (call != null) @@ -110,7 +113,10 @@ class ConnectionService : ConnectionService() { } connection.setAddress(request?.address, TelecomManager.PRESENTATION_ALLOWED) - connection.connectionCapabilities = Connection.CAPABILITY_SUPPORT_HOLD or Connection.CAPABILITY_HOLD + connection.connectionCapabilities = Connection.CAPABILITY_SUPPORT_HOLD or + Connection.CAPABILITY_HOLD or + Connection.CAPABILITY_MERGE_CONFERENCE or + Connection.CAPABILITY_SWAP_CONFERENCE // Start the SIP connection logic if (uap != 0L) { @@ -161,7 +167,7 @@ class ConnectionService : ConnectionService() { override fun onDisconnect() { if (isDisconnecting) return - if (System.currentTimeMillis() - lastDisconnectTime < 500) { + if (System.currentTimeMillis() - lastDisconnectTime < 2000) { Log.d(TAG, "Ignoring cascaded onDisconnect for $callp") return }