From deed5bb8776d9e481e806453416ae748215f41e1 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Fri, 21 Jan 2022 20:25:29 +0200 Subject: [PATCH] Change call status to "answered" only when answering incoming call --- app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index 19ed349e..e30738bd 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -704,7 +704,10 @@ class BaresipService: Service() { } "call answered" -> { stopMediaPlayer() - call!!.status = "answered" + if (call!!.status == "incoming") + call.status = "answered" + else + return } "call established" -> { nm.cancel(CALL_NOTIFICATION_ID)