Clearly software
I have the iPhone 2G and NEVER had a problem until the 2.0 software. I just missed an important text this afternoon and basically thus missed a meeting because of no sound!
Also interesting.... I use my iPhone as my alarm clock, and have done so every day since I bought it on release day in June, 2007. One day this week, the alarm failed to make a sound. The alarm worked, per se, because when I turned on the phone it was displaying the snooze button, but there was simply no sound. I strongly suspect this is the same bug--the phone is in some kind of power save mode that is turning off alert sounds. My push email alerts are totally intermittent as well, so maybe it's all related.
Thank goodness for my cat, who realized I was oversleeping and licked my face to wake me up. He's a lot more reliable than my iPhone at this point!