A reboot might work.
Also, did all of the headphone plug come out? Some cheap stuff can break off in the jack. If that isn't the case, the jack itself might have come partway loose (I recently read that the Moment's headphone jack is only held in place by the soldered wires). You may need to open up your phone and check.