If mom or dad needed to contact me, they called the office. If it was urgent, the office dispatched somebody to come get me out of class. This happened to me approximately never, but on odd occasion it did happen to somebody.
And as noted, if I needed to contact mom or dad, I used the pay phone. If it was just "come and get me from sport practice", I didn't even feed in a quarter, I just called collect and they didn't bother accepting.
Parents are a bit insane today. Growing up (pre-teens through teens), I could disappear for the better part of a day and it was no big deal. I'd ride my bike into the city (20 miles each way). I'd go skiing with friends and be gone until well after dark.
Similarly, when my son was a similar age, he's skateboard all around town. He had a cell phone for part of that period, but we pretty much never texted him and he was even less likely to text us. Kids need to stretch their wings.
Then, of course, the media was full of scary murderers during the late 1960s and 1970s and things changed. Laws also changed to get parents on the hook.
I don’t know about any relevant laws, but this was a big city, well after the 1970s. I semi-regularly walked myself a mile or so after elementary school to a parent’s office and no one batted an eye, but this may have been partially a result of the fact that the route was quite safe and largely car-free. Hmm, maybe the problem with kids’ freedom these days has as much to do with busy roads dividing up the world as with fear of school shootings.
I think that public transit in the particular area where my middle school was would have been, if anything, worse in the pre-phone era.
Parents called the office and left messages directly or had the kids call back.