From 208476881945489b7d63fcbbdef7a7e0736d8fac Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 16 May 2026 10:21:44 +0300 Subject: [PATCH] Post service event when mobile call is closed --- app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index e23dea7b..c35ab26e 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -1852,6 +1852,7 @@ class BaresipService: Service() { val callp = telecomCall.hashCode().toLong() val call = calls.find { it.callp == callp } if (call != null) { + val uap = call.ua.uap stopRinging() stopMediaPlayer() if (call.ua.account.callHistory) { @@ -1865,6 +1866,11 @@ class BaresipService: Service() { call.ua.account.missedCalls = true } calls.remove(call) + postServiceEvent( + ServiceEvent( + "call closed", arrayListOf(uap, callp), System.nanoTime() + ) + ) } if (!Call.inCall()) { proximitySensing(false)