Chosen Solution

Hello. My iPhone 7 only plays music out of the speaker when I plug in my headphones. It plays music normally when there are no earphones plugged in. Also, when I call someone I cannot hear them and they cannot hear me. On a phone call, the speaker button is dulled out, so I cannot click it. I’ve tried different earphones, cleaning the earphone socket out, and restarting my phone, and nothing works. Water may have gotten into my iphone at some point before it stopped working and I’m thinking that may have something to do with it. Please help!!!

It’s audio IC (chip) going bad. Very common fault on these phones. You will need to take it to someone that does micro-soldering or board level repairs to get the audio chip replaced.