A couple of small caveats. In some countries this mights still be illegal, or it might be illegal if you are acting as an agency and don’t employ the advisers.
Also, it would be unwise to use analogue lines for this. You want to make the PSTN interface using ISDN, either directly or via an ITSP.
A long time ago, all UK PABXes had to block attempts to bridge two PSTN lines.
Currently it is still illegal to bridge a third party call via a GSM gateway to another third party.
The original reasons were maintaining voice quality and monopoly preservation, but current reasons are more likely to be avoiding essentially fixed traffic monopolising air interface base stations and ensuring that governments can obtain communications meta data.
Analogue lines typically have poor support for answer and disconnect supervision and you may have calls staying up until the network timeout is reached.