On order to pass a call from IP side to a IP side ,you need either a call relay box (ip in, ip out), or a softswitch.
No gateway will do that, not one of the traditional gateways at least.
Gateways normally do not even play an IVR in the IP side.
The only workaround that some people used is getting a call out of the gateway on a T1 card, routing it back to the gateway as a trunk and doing a “back to back” configuration , by going VOIP-PSTN-VOIP again.
That will result on some quality issues , but some people do it anyway.