How can I get a line cord to stay in a broken modular jack?
Phones normally connect to the wall using an RJ11 plug / jack combination.  POTS phone equipment needs one pair of wires normally referred to as "tip &amp; ring".  There is a diagram of which of the 4 RJ11 wires make up the first "tip &amp; ring" pair in the 1st link above.