They sent analog signals through the line, different frequencies for each number and then the network can use analog electronics to route the signal to the correct destination. (By identifying the frequencies with filters and then using relay switches)
Before this method existed every phonecall you made reached some operator who would then connect your phone physically to the destination you told them by connecting your ports with a wire. (My grandma worked that job)
Latest Answers