I would imagine it is a hardware issue. Bring it to the Genius Bar and they may either swap the speaker or the unit. I am not sure if they will physically repair iPhone 4s or if they just swap. Depending on the diagnosis, your warranty may or may not cover it. That is up to the Genius and warranty coverage. The Genius will explore repair and replacement options with you. Then simply change the ESN over with Page Plus Customer Service.
Altemose 

