Question: why does my iphone ring but not play music?
Answer: go to SETTINGS and then enter MUSIC and go to sound restrictions maybe your sound is restricted all the way down on mute. If you have a warranty send it to apple if it does not help. It looks like a software issue, try restoring it.