Two audio issues, maybe unrelated, not sure.
Got two issues with the same iPhone 5. I'm pretty sure they're unrelated but I'm out of ideas.
First: The headphone jack doesn't work. The earpiece speaker and the loudspeaker both work fine, but there's no audio when you plug in headphones. It's not the headphones (they work with other devices) and it's not the headphone jack (it's been replaced twice). It's not the grounding strap (it's been replaced).
Second: The speakerphone mic doesn't work but only when using the app Viber. Using the normal phone app, the speakerphone mic works fine. All permissions are granted to the app. Deleting the app and reinstalling it doesn't help. It works fine under the same account on an iPhone 6 so I know it's not an account problem.