I had the same problem yesterday. The headset worked fine but I could get no sound of my speakers on my iPad 3. I searched all over and there are a variety of answers to this from the absurd to the logical. Needless to say I tried them all.
What worked for me was blowing very hard into the power connector just below the speakers. I had tried compressed air in all the openings and the only place where the speakers worked intermittently was when I was pushing air in to the power connector. I happen to have a dog that sheds a lot of very fine hair. My guess is that one or more of those went inside that slot and insulated some connection. By blowing hard inside I seemed to have cleared the problem but not totally. The sound is still a little bit scratchy.