So this has happened to me and others on XDA as well:
Symptoms: You can't hear people on a phone call, and they can't hear you. Also, no "media" sounds work - pretty much any sound made by an app (but the ringer, notification, and alarms still make sound). Also, the phone can't hear you via Google Voice Actions.
Problem: The phone thinks that a headphone (with a mic) has been plugged in. If you're familiar with Tasker, you can have Tasker alert you when headphones are plugged in and you'll see the notification go on/off several times a day.
To reproduce: I don't think you can do this - it's likely a short in the phone by the headphone sensor.
The fix: Various - some report a battery pull fixes it, others say cleaning the mic, and others say a full wipe. For me, a full factory reset did not work. I re-flashed everything to stock images, unlocked/relocked bootloader, and even played with other ROMs once I realized I'd be returning the thing. I'm now waiting on my refurbed unit (I already exchanged my Nexus once due to a stuck pixel, VZW won't give me another new one). Also, there are apps that will reset the headphone sensor via software, which has limited success.
I just wanted to post this because there are so many symptoms it can easily lead you down the wrong path. But if all media sounds don't work, or your speakerphone cuts in and out, this is probably your problem.