Calls randomly use phone speaker despite Bluetooth headset being connected

REPRODUCIBILITY: random
OS VERSION: 5.2.0.17
HARDWARE: JP2026
UI LANGUAGE: Slovenian
REGRESSION: ?

DESCRIPTION:

Sometimes the phonecall audio plays through the phone speaker despite having a bluetooth headset (Yealink BH71) connected, and phone screen showing that the headset is in use (tapping the headset icon off and on has no effect, audio remains playing through the phone speaker). This happens randomly, though it seems to happen more often when I accept a second call while disconnecting the call I’m currently having (first call was through the headset, second one starts using the phone speaker), but I’ve also had it happen when I was calling out.
Turning the headset off and back on usually causes audio to start playing through it again, so this isn’t a problem with the Bluetooth stack crashing.

PRECONDITIONS:

Unknown

STEPS TO REPRODUCE:

Random.

EXPECTED RESULT:

Phonecall audio always plays through connected headset

ACTUAL RESULT:

Phonecall audio sometimes plays through internal speaker

MODIFICATIONS:

Nothing special, though I do have Android bluetooth support installed

ADDITIONAL INFORMATION:

I was just hit by this issue. Had to restart audio and bluetooth from utilities to get audio from bluetooth headset working. Even Deezer played audio through loudspeaker, even though my headset was connected.

Just had this happen on 5.2.0.18, on multiple consecutive calls. I just restarted the phone, hopefully it’ll route the audio back to the headset.

Happened again, had to restart the phone.

Also had another weird thing happen a few days ago: heard the caller through my headset, but microphone was active on the phone.

I have had the same issue happen on my Huawei Freeclip 2 and Acefast Acefit Pro.

And just happened again (SailfishOS 5.2.0.22).

This happens pretty frequently on mine as well.
Most of the times is enough to close the app, restart Bluetooth and audio, and then it works.

Can’t say what should be restarted for the phone to also be fixed… Ofono?

FYI: Not sure if related to this and I don’t want to mix up issues. But I’ve also experienced several times that audio all the sudden plays through speakers instead of connected wired usb-c headsets - plugging them out/in again doesn’t help. Restarting audio subsystem fixes it as well. Sounds similar… Can’t reproduce it yet properly, it’s random and might happen sometimes when switching between audio sources (e.g. from Music app to web browser playing audio).