You've been able to do that since the Smartmodem. Take two machines with modems, one phone cable connecting both modems and one machine type
AT A <enter>
...and on the other...
AT D <enter>
Once the originating modem emits the carrier tone they will establish the link. The other option is to use a PBX so you can dial different phones or modems within the PBX network.
Modems also work on most VoIP lines these days albeit at slower speeds because most speech compression is terrible but really, are you gonna complain at 2400 baud?