A VoIP gateway is a device that lives in two distinct realms, the circuit switched PSTN network and the IP packet switched network. It allows voice and FAX calls from one realm to be directed to the other.

Consider a simple scenario. The person A wishes to talk to the person B. He places a local call to a gateway local to him and identifies what number in the PSTN network he wishes to reach. The gateway communicates with the gatekeeper to ensure that the user is authorized to complete the call and to resolve any bandwidth issues. If authorization is granted, the local gateway makes an IP network connection to a remote gateway which then places a local call to the person B. The costs of the two local calls, if any, are far less than the cost of a long distance call from A to B over the circuit switched telephone network.

Depending on the amount of call traffic a gateway expects to serve and the telephony protocols supported in the geographical area of its location, it may contain analog line interfaces supporting protocols such as loop start, ground start, E&M, etc. or digital T1/E1 line interfaces supporting protocols such as wink start, MFC-R2, ISDN, etc.

There are two types of gateways, Media Gateways, as described above, that handle PSTN and IP connectivity, voice compression and transcoding, echo cancellation, tone detection and regeneration, and announcements and prompts for Channel Associated Signaling (CAS) protocols. The other type is Signaling Gateways. They connect to the SS7 network and convert the signaling into a form that can be transmitted over the IP network.