I have this problem immiediately after upgrading iPhone 4 from iOS 6.1.3 to iOS 7.0.2
None of the earlier soutions worked, including the scores of suggestions to clean the charger and jack plug sockets, and all the variations on long timeout reboot, erase and restore, etc etc.. I've cleaned the socket with contact cleaner, isopropylalcohol and brush and tip, jet blow, and nyet xippedy doo dah.
I;ve toggled settings, wifi and bluetooth, sound lock etc, and played with calendars.
Of course I have an iPhone 4 so my Home button is useless.
However if you use the assistive touch accessibility settings, a small icon can be seen black or ghosting on the screen:
Settings>General>Accessibility>Assistive Touch>slide to ON
When it appears, one can move it wherever one likes on the screen.
Tapping it brings up an overlayed box on any screen.
In the box, tap Device
This brings up options including Volume UP and Volume DOWN, also Voice Control.
(Neither of the Volume UP or DOWN options work for me since upgrading my iPhone 4 to iOS 7.0.2)
BUT
You could try instead tapping Voice Control from the overlayed box.
It floats a number of voice activation suggestions.
I ignored them, and eventually for no obvious reason it just dialled one of my Contacts.
(Unfortunately, no PHONE screen appeared, but the iPhone connected to the dialled contact).
Eventually I disconnected the call after frantic taps.
At that point, my volume miraculously reappeared.
However, it disappeared as soon as my phone started ringing for an incoming call and I answered it. Sound gone again.
Voice Control trick brings the sound back, but it's lost again as soon as I receive a call.
Cleearly the problem has SOMETHING to do with detecting whether the sound is or is not hijacked by an app or docking, and the problem is extremely irritatingly diverse in its effects within the device and operating system.
My phone is now effectively useless, just a glorified memory stick.
Apple has a Real Software Problem, Houston.
Akilia