Well, you would need some circuitry to simulate phone line/exchange. These
do exist in various incarnations, mostly for testing. Putting the 48V on
the line is not that difficult, but simulating dial tone, ringing tones,
on/off hook, etc., is a bit more complicated.
Why not get a couple of cheap ethernet LAN boards (less than $10 each?)
and connect those with a cross-over cable (no hub required)?