These are ball sockets that accept Bowden cables.
The one in the front goes to the brake pedal, and prohibits shifting out of P unless the brake is pressed.
The one in the rear goes to the key cylinder to prohibit removal of the key unless in P, and also prevent shifting out of P without the key..
Both of these interlocks are due to federal mandates in the early 90s precipitated by the infamous "runaway Audi 5000".
Check out this thread where someone found a shifter from a later 124 and transplanted it into a first gen 124 without the interlock.
http://www.peachparts.com/shopforum/diesel-discussion/296365-retrofit-brake-pedal-shift-interlock-1987-w124-3.html
Note: Neutral safety switch and reverse lights are handled in the transmission on a 722.4 similar to all earlier models. Not until the 722.6 and the W210 did the reverse lights come up in to the shifter, and neutral safety is part of the conductor plate. The 210 with 722.6 has a "R/P lock solenoid", this is engaged by the transmission computer to prevent you from going into R or P at speed