Rebooting the phone did correct things for a while... until the next time I used my headset (ear-buds from my iPhone). After removing the headset and taking a phone call, the same problem occurs - audio and mic only working on speaker mode. It appears that the phone does not recognize that the headset has been unplugged. I am hoping that it is because of the headset I use (iPhone) but I haven't tried any others.
I'm experiencing the same problem as well. I've been using iPhone 5 headphones and for me, it seems to be happening when I receive a text message (vibrate mode) while I'm playing music. It seems to disable all notification sounds and the ear speaker, only way to take a phone call was to put it on speaker phone. Luckily, I've figured out a fix with out rebooting the phone everytime this happens.
Step 1, make a phone call (611) Step 2, place it on speaker phone. Step 3, insert headphones and wait till the call transfers to the headphones. Step 3, pull headphones out, your ear speaker should be working again.
I hope this is a software issue. This was happening on the Lumia 1520 I got on launch day and returned it a few hours later. I'm currently back on the 1520 (yellow) and absolutely love this device.