Ok, it sounds like what you were trying to do wasn't routing, but circuit-switching the rs232 lines.
As an alternative, PPP gives you a routed TCP/IP connection over a serial line...you offload routing onto the network layer and you can potentially have _all_ your client machines communicate with each other or even externally via standard TCP networking, and don't deal with circuit-switching the serial connections at all. For things that are TCP capable this is probably the cleanest solution.
If you want to support software that requires direct serial/modem links and not TCP, you will need something else in the mix. On the software side, I'd check the software to make sure you can't just turn off the AT commands altogether and use raw serial. Even where it wasn't a supported/intended setup, most software that explicitly handled modems allowed specifying alternate AT command strings, so you _might_ be able to just blank them out and go straight to serial. As far as circuit-switching...I know I've seen hardware devices that did this, but not in decades, so likely not easy to find any more. A quick google only turned up a bunch of datasheets for chips that could do it, but seems like you'd have to build your own device or track down a vintage device.
Yes, it was actuality circuit switching, every serial port has it's number assigned and each computer could "dial-up" each other, but there is also a "virtual" number that anyone could dial up to (even at the same time) that will connect to a PPP session to connect via IP/TCP to the outside word. This last part was the one that still need a bit of work since it doesn't always work as i expect.
So i, basically, do both. packet and circuit network according to need.
As far as circuit-switching...I know I've seen hardware devices that did this, but not in decades, so likely not easy to find any more
software based circuit switching seem to work fine for what i need, is really not that complicated, it also make me do cool thing like wiresharking!
As an alternative, PPP gives you a routed TCP/IP connection over a serial line...you offload routing onto the network layer and you can potentially have _all_ your client machines communicate with each other or even externally via standard TCP networking, and don't deal with circuit-switching the serial connections at all. For things that are TCP capable this is probably the cleanest solution.
If you want to support software that requires direct serial/modem links and not TCP, you will need something else in the mix. On the software side, I'd check the software to make sure you can't just turn off the AT commands altogether and use raw serial. Even where it wasn't a supported/intended setup, most software that explicitly handled modems allowed specifying alternate AT command strings, so you _might_ be able to just blank them out and go straight to serial. As far as circuit-switching...I know I've seen hardware devices that did this, but not in decades, so likely not easy to find any more. A quick google only turned up a bunch of datasheets for chips that could do it, but seems like you'd have to build your own device or track down a vintage device.
For multiport cards, an amazon search turned this up as the first result: https://www.amazon.com/Port-Rs232-Multiport-Serial-Card/dp/B...