Well now that is not just the microphone if you can't hear them either. However, you don't mention what happens when making calls through the phone itself (not messenger).
Also have you gone into "Settings" and then "Sounds" and made sure all the volumes are set at a reasonable level and not muted?
If the levels are fine, then I would try starting up the phone in "Safe Mode" and see if your sounds work in there. Now you can't access most apps in there, so you have to use sounds on the phone. If they work fine and you can make phone calls (using the phone's dialer not another app) then there is something on the phone that is messing with your access. Virus, malware, bad app, etc. that you will need to remove.
NOTE: If it just happens...