From 5dd2d65bbcfdcfb80bf8359aa75c5737675589d5 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Thu, 5 Dec 2024 07:48:51 +0200 Subject: [PATCH] Set bevent to val --- app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 3 ++- 1 file changed, 2 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 e9d6b352..6a09d2a2 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -727,6 +727,7 @@ class BaresipService: Service() { } "incoming call" -> { val peerUri = ev[1] + val bevent = ev[2].toLong() val toastMsg = if (!Utils.checkPermissions(this, arrayOf(Manifest.permission.RECORD_AUDIO))) getString(R.string.no_calls) else if (!requestAudioFocus(applicationContext)) @@ -740,7 +741,7 @@ class BaresipService: Service() { if (toastMsg != "") { Log.d(TAG, "Auto-rejecting incoming call $uap/$peerUri") Api.sip_treply(callp, 486, "Busy Here") - Api.bevent_stop(ev[2].toLong()) + Api.bevent_stop(bevent) toast(toastMsg) val name = "callwaiting_$toneCountry" val resourceId = applicationContext.resources.getIdentifier(