Why is my iPhone using inbuilt mic instead of my Bluetooth headset?

Why my iPhones inbuilt microphone remains active when I connect it to my bluetooth headsets. It should use headsets mic. Can anybody tell me what’s wrong?

Device: iPhone 7 Plus

Headset: JBL T500BT

Thank you,