rfine: this is a standard application and is a long way from what you describe. The intent is that the caller only gets charged for a short call, then hangs up, after which the system automatically connects to their intended destination then make an outgoing call to the original caller.
I believe ianplain has provide pointers to such applications before, but I don’t have one to hand.