A voice over Internet protocol (VoIP) gateway includes a foreign exchange
office (FXO), a foreign exchange station (FXS), and a VoIP processor. A
controller of the VoIP gateway sets the VoIP gateway to either a TANDEM
(trunk and ENM (ear and mouth)) mode or a standalone mode. In the TANDEM
mode, the VoIP gateway transmits an incoming call from the VoIP processor
to the FXO and an outgoing call from the FXS to the VoIP processor. In
the standalone mode, the VoIP gateway transmits the incoming call from
the VoIP processor to the FXS and the outgoing call from the FXS to the
VoIP.