I also have the sound problem on my iPhone 4. No sound at all. Not even when plugging in my headset. Videos would not play. Phone ringer dit not sound. Youtube did not work.
When recording a video it would start recording and then would not let me stop the recording. I had to shut down the phone to stop the recording. Normal reboot also did not fix my problem.
I then did the two finger reboot. Hold the on and home button in until you see the Apple. Keep holding it in until the screen goes black. Now switch it on normally. After this reboot everything started working. The phone once asked me permission to use the microphone. Cant remember which app. Think it was YouTube. But now every single feature works, even after locking and unlocking.
After normal rebooting the problem was back!**$$##! Tried the two finger reboot again. Did not fix it. I still have the problem. I think I will go back to iOS 6 until someone comes up with a solution.
I dont have this problem on my iPad