From 44dfd85231acb0988a8f9c543fb7b109e1be94e7 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Mon, 26 Jul 2021 19:55:11 +0300 Subject: [PATCH] ... and some more --- app/src/main/cpp/baresip.c | 3 +++ app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/cpp/baresip.c b/app/src/main/cpp/baresip.c index cd9c4fd0..6893693d 100644 --- a/app/src/main/cpp/baresip.c +++ b/app/src/main/cpp/baresip.c @@ -198,6 +198,9 @@ static void ua_event_handler(struct ua *ua, enum ua_event ev, case UA_EVENT_CALL_OUTGOING: len = re_snprintf(event_buf, sizeof event_buf, "%s", "call outgoing"); break; + case UA_EVENT_CALL_ANSWERED: + len = re_snprintf(event_buf, sizeof event_buf, "call answered", prm); + break; case UA_EVENT_CALL_LOCAL_SDP: len = re_snprintf(event_buf, sizeof event_buf, "call %sed", prm); break; diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index 3b0e7317..b49389e1 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -711,12 +711,8 @@ class BaresipService: Service() { if (Call.calls().size == 0) { resetCallVolume() am.isSpeakerphoneOn = false - if (am.isBluetoothScoOn) { - Log.d(TAG, "Stopping Bluetooth SCO") - am.stopBluetoothSco() - } else { - abandonAudioFocus() - } + am.stopBluetoothSco() + abandonAudioFocus() am.mode = AudioManager.MODE_NORMAL proximitySensing(false) }