You sure you're not just moving it slightly away from your head, causing the screen to turn on, and allowing buttons to be pressed?
Make a test phone call, put the phone down on a table or something, then put your hand over the sensor. Make sure the screen turns off, then try to press buttons and see if they're actually doing anything. Start with that.