These are called telephone line simulators, and you can find them on eBay occasionally still.
If you want the 56k standards (K56flex, X2, V.90, V.92) though, it gets more complicated because the 56k side of the connection has to be connected via ISDN. So you'll need an ISDN simulator instead, plus an ISDN modem which speaks the 56k protocol and a way to get an analogue phone connection out of an ISDN line (might be built into some simulators but there are other ways to do this as well).
If you want the 56k standards (K56flex, X2, V.90, V.92) though, it gets more complicated because the 56k side of the connection has to be connected via ISDN. So you'll need an ISDN simulator instead, plus an ISDN modem which speaks the 56k protocol and a way to get an analogue phone connection out of an ISDN line (might be built into some simulators but there are other ways to do this as well).