In the paper, a method for the estimation of the contact force and contact location is proposed. Contact can occur at any point on the body of the robot manipulator. The contact force estimation algorithm is based on the measurement of the part of the joint torques caused by the external force. As this is a complex nonlinear problem, the proposed method is based on nonlinear constrained optimization. Using certain assumptions, the complexity of the problem is reduced. In this paper, only robots with cylindrically-shaped links are considered. The simulation and experimental results show that the proposed approach allows the estimation of the contact forces by using only the joint torque sensors, without any additional external sensory systems for the detection of contacts along the robot body-structure.