Most devices have options to determine how incoming and outbound audio are processed. These settings can affect the way your phone utilizes Bluetooth audio. They should be modified if you consistently have issues with audio leaving the Bluetooth headset/speaker and instead connecting through the mobile device speaker.
iPhone: Open settings, search for Bluetooth headset.
Android: Navigate to the phone’s Settings > Bluetooth > Select the gear icon to the right of the Bluetooth device > At the bottom of this screen you should see ‘Use for’ with two options, Call Audio and Media Audio > Select which types of audio you’d like to be handled by this device to improve communication between your device and the Bluetooth device.