# Connect Cloud Voice to a TA1600/2400/3200 FXS Gateway

A TA1600/2400/3200 FXS gateway lets you bring traditional analog phones into your Cloud Voice phone system. FXS (Foreign Exchange Station) ports are the sockets on the gateway that supply dial tone to an ordinary analog phone. Each analog phone plugs into an FXS port, and that port registers to Cloud Voice (your PBX, or Private Branch Exchange) as a standard extension. Once the link is in place, the analog phone behaves like any other extension on the system.

The setup has four parts:

1. Create the extension on Cloud Voice.
2. Point the gateway at your PBX as a VoIP (Voice over Internet Protocol) server.
3. Choose the dial pattern the port should use.
4. Register the FXS port to the extension.

## Step 1. Create the extension on Cloud Voice

Start by adding the extension that the analog phone will use.

1. Sign in to the PBX web portal and go to **Extension and Trunk > Extension**.
2. Click **Add** and configure the new extension. The examples in this guide use extension **1000**.

   ![New extension being added on the Cloud Voice extension page](/images/pbx/create-extension-pce.png)
3. Click **Save**, then **Apply**.

:::tip
Record the extension's number, registration name, and registration password now. You will enter all three on the gateway in Step 4. The registration name and password live on the extension's registration/security settings in the PBX portal.
:::

## Step 2. Add Cloud Voice as a VoIP server on the gateway

Tell the gateway how to reach your PBX by defining it as a VoIP server.

1. Sign in to the gateway's web interface and go to **Gateway > VoIP Settings > VoIP Server Settings**, then open a VoIP server for editing.
2. In the dialog, set the following:

   
   ![Cloud Voice, VoIP server settings dialog on the gateway with the SIP type, UDP transport, and port register mode selected](/images/pbx/voip-server-pce.png)

   - **Server Name**: A label that helps you recognize this VoIP server.
   - **Type**: Select **SIP** (Session Initiation Protocol, the signaling used to set up calls).
   - **Transport**: Select **UDP** (User Datagram Protocol).
   - **Hostname/IP**: Enter your PBX domain name followed by its SIP registration port.
   - **Domain**: Enter your PBX domain name.
   - **Register Mode**: Select **Port Register**.
3. Click **Save**, then **Apply Changes**.

:::caution
**Hostname/IP** must include the SIP registration port, not just the domain name, or the gateway cannot reach the PBX. The **Transport** setting (UDP here) has to match what your PBX accepts; a mismatch stops the port from registering.
:::

:::note
**Port Register** mode tells the gateway to register each FXS port to the PBX individually, as its own extension. That is exactly the behavior you want when mapping one analog phone to one extension.
:::

## Step 3. (Optional) Adjust a dial pattern template

The gateway ships with dial pattern templates whose pattern is set to `.`, which permits dialing any number. If the default suits you, skip this step.

To use a custom pattern, go to **Gateway > VoIP Settings > Dial Pattern Template** and edit the template you want. This guide keeps the defaults on **DialPatternTemplate1**.

![Dial pattern template on the gateway showing the default settings](/images/pbx/dial-pattern-pce.png)

## Step 4. Register the FXS port to the extension

Now bind an FXS port to the extension you created in Step 1.

1. In the gateway's web interface, go to **Gateway > Port List > Port List** and open an FXS port for editing.
2. In the dialog, set the following:

   ![FXS port registration settings on the gateway mapped to a PBX extension](/images/pbx/extension-registration-pce.png)

   - **Caller ID Name**: A label that helps you identify this FXS port.
   - **Caller ID Number**: The extension number.
   - **VoIP Server**: Select the VoIP server you defined in Step 2.
   - **User Name**: The extension number.
   - **Authentication Name**: The extension's registration name.
   - **Password**: The extension's registration password.
   - **Dial Pattern Template**: The template to apply to this FXS port.
   - **DID Number**: (DID stands for Direct Inward Dialing.) Enter the extension number.
3. Click **Save**, then **Apply Changes**.

:::caution
**Authentication Name** and **Password** must exactly match the extension's registration credentials from Step 1. If either is wrong, the FXS port will not register: the analog phone gets no dial tone and cannot be called.
:::

## Confirm the registration

Check that the port has come up on both sides:

- In the PBX web portal, go to **Extension and Trunk > Extension**. A successful registration shows the registered indicator ![Registered status icon](/images/pbx/SIP.png) next to the extension.

  ![Extension list on Cloud Voice showing the FXS extension as registered](/images/pbx/extension-status-pbx.png)
- On the gateway, go to **Status > System Status > FXS Port Status**. A registered port reads **OK**.

  ![FXS port status on the gateway reading OK](/images/pbx/port-status-gateway.png)

With the port registered, the analog phone can now place and answer internal calls across the phone system.

:::note
At this point the analog phone can only make and receive internal (extension-to-extension) calls. To let it reach outside numbers or receive calls from outside, complete the outbound and inbound route setup in the guides below.
:::

## What to do next

- To let the analog phone reach external numbers over a PBX trunk, see [Make Outbound Calls from an Analog Phone Connected to a TA1600/2400/3200 FXS Gateway](/pbx/integrations/cloud-voice-ta-fxs/make-outbound-calls-from-an-analog-phone-connected-to-cloud-voice-ta2400-gateway/).
- To let the analog phone receive calls from outside, see [Receive Inbound Calls on an Analog Phone Connected to a TA1600/2400/3200 FXS Gateway](/pbx/integrations/cloud-voice-ta-fxs/receive-inbound-calls-on-an-analog-phone-connected-to-cloud-voice-ta2400-gateway/).
