Are you using the same headphones on both iPhones?
Have you tried alternative headphones?
Have you compared other iPhones, using your headphones?
Has anyone else experienced the same sound on your iPhone with their headphones?
What happens if you play back on the speaker, still muffled?
You need to work out if it's the headphones or the iPhones causing the problem.
Sounds obvious I know and you may have done this, but need to be clear!