THe voip gateway connects through a LS/DS line card. The caller calls a number, the voip gateway recognizes the digits (Phone number -> IP), and send it to the ip address specified (Other gateway). THe remote office auto answers that line and the customer calling in hits a taget line number to get to the other extension.
I was trying to put it in simple terms.