I couldn't get any sound out of the ear speaker on my iPhone 5s. The volume control icon on the screen would read "headphones" instead of "ringer."
This worked for me: I dipped a cotton ear swab in rubbing alcohol, then poked it into the headphone jack until I felt resistance. Twisted the swab clockwise a few turns, then removed the swab. Then I inserted a dry cotton ear swab into the headphone jack, again until I felt resistance, and I also twisted it clockwise a few times, then removed it. Seems to have worked so far.