# Set up Fax over IP (FoIP)

Fax over IP (FoIP) is the process of carrying traditional fax traffic between two fax machines over the internet. It uses T.38, a protocol built specifically to relay fax pages reliably across a Voice over IP (VoIP) network where the normal audio path would corrupt the signal. To fax through the phone system, turn on T.38 for the extensions and trunks involved, and adjust the global T.38 options if transmissions are unreliable.

:::caution
T.38 has to be supported on both ends of the call. The fax device (or the analog telephone adapter it plugs into) and the trunk provider carrying the call must each support T.38. If either side does not, faxes will fail even when the phone system is configured correctly.
:::

## Turn on T.38 for a SIP extension

Enable **T.38 Support** on an extension when you plan to register a T.38-capable fax machine to it as a SIP (Session Initiation Protocol) endpoint. This is the extension the fax device logs in to, the same way a desk phone registers.

1. In the PBX web portal, go to **Extension and Trunk > Extension** and open the extension you want to edit.
2. Select the **Advanced > VoIP Settings** tab.
3. Select the **T.38 Support** checkbox.
4. Click **Save**, then **Apply**.

:::note
A traditional fax machine has no network port, so it connects through an analog telephone adapter (ATA) that registers to this extension as the SIP endpoint. A fax machine with a built-in SIP client can register directly.
:::

## Turn on T.38 for a SIP trunk

Enable **T.38 Support** on a trunk that will carry outbound or inbound faxes. The trunk is the connection between the phone system and your service provider, so this is the path faxes travel to reach the outside world.

1. In the PBX web portal, go to **Extension and Trunk > Trunk** and open the trunk you want to edit.
2. Select the **Advanced > VoIP Settings** tab.
3. Select the **T.38 Support** checkbox.
4. Click **Save**, then **Apply**.

:::note
Changes do not take effect until you click **Apply**. Saving alone stores the setting without pushing it to the running phone system.
:::

## Adjust the T.38 settings

If Fax over IP still does not work after enabling T.38 on the extension and trunk, fine-tune the system-wide T.38 options.

1. In the PBX web portal, go to **PBX Settings > SIP Settings > T.38**.
2. Update the settings as needed:
   - **T.38 Max BitRate**: The highest bit rate allowed for a fax transmission.
   - **No T.38 Attributes in re-INVITE SDP**: When enabled, the T.38 attributes are left out of the SDP (Session Description Protocol, the part of a SIP message that describes the media session) in re-INVITE packets. A re-INVITE is the SIP message that renegotiates a call already in progress, such as when it switches from voice to fax mode.
   - **Error Correction Mode**: When enabled, the phone system checks each completed fax page and tells the sending fax machine which frames arrived with errors. The sender retransmits those frames, and the cycle repeats until every frame is received without errors.
3. Click **Save**, then **Apply**.

:::tip
On a congested or high-latency network, lowering **T.38 Max BitRate** and keeping **Error Correction Mode** enabled usually improves reliability. Slower, error-corrected transmissions get through where faster ones drop.
:::

:::caution
Only enable **No T.38 Attributes in re-INVITE SDP** if your trunk provider specifically requires it. It changes how the phone system signals the switch to fax, and setting it when it is not needed can stop fax negotiation from completing.
:::
