Skip to content
Answer Stack
Open menu

What is a PSTN gateway, and what do FXS and FXO ports do?

✓ Verified Last reviewed by AnswerStack Next review due Dec 14, 2026

Every claim is sourced below

A PSTN gateway converts phone calls between telephone circuits and IP packets, so equipment built for one kind of network can work with the other. FXS and FXO are the two ends of an analog phone line. An FXS port plays the phone company's part and supplies dial tone and ringing, so you plug a telephone or fax machine into it. An FXO port plays the telephone's part, so you plug an existing analog line into it.

What the gateway converts

A gateway is the device where a telephone circuit meets an IP network. RFC 3435, an IETF document on controlling gateways, describes a media gateway as typically a network element that converts between the audio on telephone circuits and the data packets on an IP network. The conversion runs both ways. Speech arriving on a telephone line leaves as packets, and packets arriving from the IP side leave as a telephone signal.

The RFC sorts gateways by what they connect to. A trunking gateway sits between the telephone network and a voice over IP network and typically manages a large number of digital circuits. A residential gateway offers "a traditional analog (RJ11) interface" for ordinary phones. An access gateway can offer an analog interface or a digital PBX interface. So a PSTN gateway does not need analog ports at all. One that connects only digital trunks, such as a PRI, needs neither FXS nor FXO for that job. Whether a given model also has analog ports depends on how it is equipped. Our answer on how the PSTN works covers the carrier-scale version.

A gateway's job is also different from a phone system's. In the design RFC 3435 describes, a call agent outside the gateway decides where a call goes, and the gateway does the converting. Other gateways handle more of the call setup themselves, and some products put a gateway and a phone system in one box. Either way, the gateway's job is the conversion. Extensions and call queues come from the phone system it works with.

FXS and FXO are the two ends of one line

An analog phone line has a side that supplies and a side that uses. Cisco's guide to analog signaling describes the common loop-start arrangement. The central office or FXS side supplies battery power to the line and has a ring generator. The telephone or FXO side leaves the loop open while idle and closes it when someone picks up. Current then flows, and the FXS side detects it and sends dial tone.

FXS stands for foreign exchange station, and FXO stands for foreign exchange office. Each name tells you what belongs on the other end of the cable. A station, meaning a telephone, plugs into an FXS port. A line from the phone company's office plugs into an FXO port.

The two types only work in pairs. Patton's technical note on the two interfaces states the rule: "a telecommunications line from an FXO port must connect to an FXS port in order for the connection to work." Join two FXO ports and neither side supplies dial tone. The jacks look the same, so read the label on the port before plugging anything in.

What you are connecting Gateway port What the port does
Analog telephone, fax machine or alarm dialer FXS Supplies dial tone and ringing, as the phone company's line did
Existing analog line from a carrier FXO Answers and dials on that line the way a telephone would
Analog extension port on an existing PBX FXO Treats the PBX port as its line, because that port supplies dial tone

How each connection works

An analog phone plugs into an FXS port. When someone lifts the handset, the gateway detects it, plays dial tone and collects the digits. It then passes the call to the IP phone system, which decides where the call goes. To that system, the old phone is one more extension.

An analog carrier line goes the other way. Suppose an office with an IP phone system keeps one analog line from the local carrier and plugs it into an FXO port. When a call arrives on that line, the gateway answers it as a telephone would and hands it to the phone system. For an outside call, the gateway takes the line off hook and dials.

An existing PBX can stand in the carrier's place. A PBX's analog extension ports are FXS ports, since analog phones plug into them. A gateway that connects to one of those ports therefore needs FXO. The PBX's analog line ports are the reverse. They are FXO ports made to take a carrier line, so a gateway that feeds them needs FXS.

Choosing the mix of ports

The mix of ports is a buying decision, and Cisco's VG400 data sheet shows the range within one product family. The VG400 connects analog phones, fax machines and modems to a Cisco phone system. One model has two FXS and two FXO ports. Another has eight FXS ports and no FXO, which suits a site with analog devices to keep and no analog carrier line to connect.

So count connections before choosing a gateway. Each connection that expects to be given dial tone needs an FXS port. That covers the line to each analog device you are keeping and each analog line port on an older PBX the gateway will feed. Each connection that supplies dial tone needs an FXO port. That covers each analog carrier line you are keeping and each analog PBX extension port the gateway will connect to. If the outside connection is a SIP trunk or a PRI and no PBX extension ports are involved, the FXO count is zero. We cover the rest of that setup in what equipment you need for SIP trunking.

FXO ports can also serve as a fallback. The VG400 data sheet describes a way to use designated analog phone ports "to make phone calls through the PSTN during a power outage." That only helps while a working analog line is still attached, and not every gateway has the feature.

What a matching port does not tell you

The port type settles which side supplies dial tone. It does not settle whether a fax machine or alarm panel will get its data through an IP network. Fax is the usual example. The VG400 documents two methods, T.38 fax relay and fax pass-through. The POTS replacement service from Atlantech Online, a business phone and fiber provider, uses T.38 relay or G.711 pass-through for fax lines. Whichever method is used, the gateway has to use the same one as the service on the other side.

Atlantech's service also shows how the pieces fit together in a building. It replaces copper phone lines with a managed appliance, and its cutover description says "each analog line is moved to an FXS port on the new appliance." That appliance is doing a gateway's FXS job for elevator phones, fire panels and fax machines, the kind of legacy devices at risk when copper lines are retired. On the other side it connects over broadband, with 4G LTE as a second path.

The port is one of three things to check, along with transport and power. The port role is FXS, which tells you the device will be given an analog line. The transport is broadband or LTE, which tells you how the call leaves the building. A copper line was powered from the phone company's office, and an appliance needs power on site. Atlantech lists up to 24 hours of battery backup.

None of the three shows that a particular alarm panel will report correctly, and Atlantech's process does not assume it will. Fire and elevator lines are "tested end-to-end with the monitoring center after each cut." That live test with the party on the far end is the step to copy with any gateway, whoever supplies it.

Sources

RFC 3435: Media Gateway Control Protocol (MGCP) Version 1.0

Internet Engineering Task Force (IETF)

Independent Verified Sep 15, 2026 Supports: Definition of a media gateway as a network element providing conversion between audio signals carried on telephone circuits and data packets; the decomposed split of call control intelligence in the Call Agent and media functions in the gateway; the trunking gateway (large number of digital circuits

“a network element that provides conversion between the audio signals carried on telephone circuits and data packets carried over the Internet or over other packet networks”

What are FXS and FXO?

Patton Electronics

Supporting Verified Sep 15, 2026 Supports: Vendor technote used as general explanation: FXS delivers dial tone, battery current, and ring voltage and points to the subscriber; FXO receives POTS service and provides on-hook/off-hook loop closure; a line from an FXO port must connect to an FXS port; FXS devices supply approximately 50 volts DC

“A telecommunications line from an FXO port must connect to an FXS port in order for the connection to work.”

FXS and FXO: What They Are and Different Phone Applications

TC Communications

Supporting Verified Sep 15, 2026 Supports: Vendor education page used as general explanation: FXS delivers dial tone, ringing voltage, and battery power to FXO end devices; the FXO interface delivers an on-hook/off-hook loop closure and dials in DTMF; FXS-to-FXS operation across a transport link produces a hotline or crash phone in which lif

“The FXO interface delivers an on-hook/off-hook loop closure.”

FXO vs FXS: What is, Differences and Ports Explained

Yeastar

Supporting Verified Sep 15, 2026 Supports: Vendor blog used as general explanation and as a statement of what Yeastar's own gateways do: an FXS gateway connects analog phones, fax machines, and PABX to IP telephony; an FXO gateway connects a VoIP system to analog lines and can provide a failover or fallback solution by connecting the PBX to

“FXO Gateway can offer a failover or fallback solution by connecting your PBX to an outside telephone line if the network crashes or SIP trunking to IP-PBX fails.”

RFC 3261: SIP: Session Initiation Protocol

IETF

Independent Verified Sep 15, 2026 Supports: SIP is an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants, including internet telephone calls; RFC 3261 is a Proposed Standard.

“an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants”

ITU-T H.248.1: Gateway control protocol

International Telecommunication Union (ITU-T)

Independent Verified Sep 15, 2026 Supports: H.248.1 is the ITU-T gateway control protocol used by an external call agent to control a decomposed media gateway; the in-force component is H.248.1 (03/13), Version 3.

“H.248.1 (03/13) Gateway control protocol: Version 3 . In force”

HT813 Datasheet (03.2024.02)

Grandstream Networks

Primary source Verified Sep 15, 2026 Supports: What this specific device does: one RJ11 FXS port and one RJ11 FXO PSTN line port with lifeline support; lifeline hard-relays the FXS port to the FXO port in case of power outage; fax over IP listed as T.38 compliant Group 3 fax relay up to 14.4 kbps with auto-switch to G.711 for fax pass-through; s

“Fax over IP: T.38 compliant Group 3 Fax Relay up to 14.4kpbs and auto-switch to G.711 for Fax Pass-through”

Digital VoIP Gateways

Sangoma Technologies

Primary source Verified Sep 15, 2026 Supports: What Sangoma's own digital gateways do: convert voice media between PRI connections or BRI lines and VoIP connections, available in 1 to 8 ports of T1/E1/PRI; Vega 100G 1-port T1/E1/PRI for up to 30 calls; Vega 200G 2-port for up to 60 calls; Vega 400G 4-port for up to 120 calls; Vega 60G BRI 2 BRI

“Sangoma's digital VoIP gateways are available in 1 to 8 ports of T1/E1/PRI for connecting TDM phone systems to VoIP networks and IP enabled networks to the PSTN.”

ISDN and Analog Media Gateways

AudioCodes

Primary source Verified Sep 15, 2026 Supports: What AudioCodes' own range covers: MediaPack 50x at 2/4/8 FXS and 4 FXO ports; MediaPack 5xx at 16/24/32 FXS and 8/12 FXO ports; MediaPack 1288 at 72/144/216/288 FXS voice ports; Mediant 500 at 30 channels PRI; Mediant 800 up to 124 channels; Mediant 1000 up to 192 channels; Mediant 3100 up to 1,920

“Mediant 3100: Up to 1,920 channels; PRI interface”

ISDN Glossary

Cisco

Supporting Verified Sep 15, 2026 Supports: Vendor reference used as general explanation of PRI channel structure: a PRI consists of 24 channels on T1 or 31 on E1, with one channel reserved for call signaling; the D channel is the 24th on T1 and the 16th on E1, leaving 23 bearer channels on a T1 PRI and 30 on an E1 PRI.

“a PRI will consist of 24 channels (T1)... one channel is reserved for call signaling. For T1s, the D-channel is the 24th channel”

ITU-T T.38: Procedures for real-time Group 3 facsimile communication over IP networks

International Telecommunication Union (ITU-T)

Independent Verified Sep 15, 2026 Supports: T.38 is the ITU-T recommendation for real-time Group 3 facsimile communication over IP networks; the in-force component is T.38 (11/15), with the 1998, 2002, 2004 and later editions listed as superseded.

“T.38 (11/15) Procedures for real-time Group 3 facsimile communication over IP networks . In force”

Setting up faxing (Poly OBi series ATA)

Zoom

Primary source Verified Sep 15, 2026 Supports: What this provider requires on the device: T38Enable set to Disabled and FaxPassThroughCodec set to G711U (default for North America) or G711A. Also states that faxing has known limitations when implemented as a fax over VoIP service, that those limitations are technology-based and industry-wide, an

“T38Enable=Disabled ... FaxPassThroughCodec=G711U (default for North America) or G711A”

Setting up an analog telephone adapter (ATA) for Fax

RingCentral

Primary source Verified Sep 15, 2026 Supports: What this provider states about its own fax path: the service uses the T.38 standard for fax and adheres to FCC guidelines regarding its use, the T.38 standard is not guaranteed for every end-to-end connection, and users should test speed, quality, and reliability before selecting an ATA device.

“The T.38 standard isn't guaranteed for every end-to-end connection.”

Revision history

1 revision since publication
Originally published