It sounds as if you have a "Classic" Audio IC issue that will require microsoldering for repair. Look up Iphone 7 audio IC and C-12 jumper on Google and Youtube and you will find a goldmind of videos showing the repair needed for your phone. You can find a reputable Repair shop locally that can perform Microsoldering repairs by googling it or simply search here on Ifixit in the business listings for a repair tech that can perform a "No Fix/No Fee" mail in repair for you.