From 1282903e0da41d425cbe2d9d346c635ca0f9b725 Mon Sep 17 00:00:00 2001 From: Val Packett Date: Thu, 14 May 2026 04:55:01 -0300 Subject: [PATCH] find-voice-call-profile: don't skip profiles with "unknown" availability While testing this script I've found out that all profiles on my device have "unknown" availablility rather than "yes", so they were skipped. Fix by changing the check to not-"no". While here, add more debug logging that would've helped debug this, and fix the indentation on one line where it was off. --- src/scripts/device/find-voice-call-profile.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scripts/device/find-voice-call-profile.lua b/src/scripts/device/find-voice-call-profile.lua index eb6910f0..09e30d8e 100644 --- a/src/scripts/device/find-voice-call-profile.lua +++ b/src/scripts/device/find-voice-call-profile.lua @@ -61,10 +61,13 @@ SimpleEventHook { for p in device:iterate_params ("EnumProfile") do local profile = cutils.parseParam (p, "EnumProfile") + log:debug (device, string.format ( + "Checking profile '%s': available == %s, priority == %d", + profile.name, profile.available, profile.priority)) local found = string.find (profile.name, "^Voice Call") - if profile.available == "yes" and found ~= nil then + if profile.available ~= "no" and found ~= nil then if (not selected_profile) or selected_profile.priority < profile.priority then - selected_profile = profile + selected_profile = profile end end end