Use an SS7 archtiecture that includes two SSPs
(Satelite PBX), an SSP that controls the ringback tone
selection, a Media Server to render the media stream.
Use INAP to communicate between nodes, just like in
the real-world.
For bonus points, take the SS7 version and move it to IP
retaining the architecture but use SOAP instad of INAP
and RTP instead of E1 or T1 bearers