I had the same thing happen to me just over a month ago I did a hard reset and that seemed to fix the problem. I called apple when it happened and told them everything I did and they said it sounds like a software problem.
Well had a problem with the sound on my iPhone 4. So I call AT&T to ask them if I should deal with them or apple only to have them tell me it was out of warranty but to talk to apple. Now I bought my iPhone last June 17th or 18th so I should still have time left on it. The phone is a refurb but...