The bluetooth device was on and it had been paired in the past. But the audio was not being routed to it in other apps or my app. I had forgotten that it was paired.
Other apps would route sound to the speaker. The iPhone phone app pops up with an option to choose the headset or not.
I don’t think this is a common scenario. But maybe OpenEars should allow for the app to decide if the bluetooth is used or not because it seems many apps ignore the bluetooth output.
In my use case I probably need to change my app to behave like OpenEars :)