My iPhone says that there's headphones plugged in but there isn't?

I haven't used the headphone jack in my iPhone for a long time and today out of the blue when ever I try to turn up the volume it says It's adjusting the headphone volume. Is there a way to fix it on my own? I look in the slot and I can see one of the buttons just looks jammed down

This happened to me on my iPad once. Tbh I don't totally remember how I fixed it but try updating now it, if it is already up to date, try actually plugging in headphones and take them out and see if that fixes it. Hope that helps

This happened to my iphone. These are the steps I did to fix it. For me solution number 3 is what did the trick. Hope this helps.

1. Unplug and re-plug iPhone headphones several times (at least 8 to 10 times)

2. Reset the iPhone. Press and hold Sleep/Wake button and Home button together until Apple logo appears.

3. Play a song (lengthy duration) and allow iPhone to completely lock. Now insert iPhone compatible headset jack. Unlock iPhone. Stop audio and unplug jack.

4. Plug in headset when phone is locked. Hold down power button. It will bring "slide to power off" bar. Now remove the headphones. Press the "cancel" button at the bottom of the screen. Now check the sound.

5. Connect your iPhone via Bluetooth to a speaker system. Play a music. Switch from speaker system back to Phone.