I wanted to be able to summon the Google Assistant by turning the crank of the phone, which historically is how you would have summoned the operator. Originally turning the crank would generate an AC voltage of approximately 90 volts, which would cause the bells on the operator's end to ring signaling that you wanted to place a call. I actually considered half a dozen different ways of detecting the handle being turned including hall effect sensors on the gear teeth, but eventually settled on what I think is the simplest. The way the crank is designed, when you start turning it it converts the first half rotation into horizontal movement to slide the shaft sideways and make contact with a terminal. This completes the circuit and allows subsequent turns of the generator to send voltage down the telephone line. When you stop cranking, a spring slides the shaft back away from the contact and breaks the circuit so that the lines can be used for the telephone call.
I removed the contactors and replaced them with a nano switch that would be pressed when the crank was turned.
This worked great to detect cranks but I had to adjust the mount to hold the switch at an angle due to space constraints in the telephone housing.
This works perfectly and fits in the telephone housing with a few mm to spare.
I added wires and the generator was ready to go back into the housing.