HTC one m7
Check gesture settings and sound settings. You may have accidentally set an option like wherein when you get a call, phone goes quiet when you pick it up.