# Auto Provision TA FXS Gateways

Cloud Voice can provision TA-series FXS (Foreign Exchange Station) gateways for you, so you don't have to configure each device by hand. An FXS gateway connects analog equipment, such as desk phones or fax machines, to your phone system over the network, so each analog port behaves like a normal extension.

The workflow has two halves: you build a configuration file on the PBX (Private Branch Exchange, your phone system), copy the provisioning link it produces, and paste that link into the gateway. From then on the gateway pulls its settings remotely, which makes it easy to deploy hardware that lives at another site.

## Supported gateway models

- TA100, TA200
- TA400, TA800
- TA1600, TA2400, TA3200

## Before you begin

- Make sure the PBX is running firmware **84.18.0.18** or later.
- Have the gateway's MAC address (Media Access Control address, the unique hardware ID printed on the device label) on hand.

![A TA gateway label showing where the MAC address is printed](/images/pbx/gateway-mac-addr.png)

:::caution
Gateway auto provisioning requires PBX firmware **84.18.0.18** or later. On earlier versions the feature is not available and provisioning will not complete, so upgrade the PBX before you start.
:::

## Step 1. Build the gateway's configuration file on the PBX

1. Sign in to the PBX web portal and open **Auto Provisioning > Gateways**.
2. Click **Add**.
3. Under **Gateway**, identify the device:

   ![Gateway identity fields for model, MAC address, and remark](/images/pbx/gateway-info.png)

   - **Model**: Choose the gateway model.
   - **MAC Address**: Enter the gateway's MAC address.
   - **Remark**: Optional. A short label to help you recognize the device later.

4. Under **Options**, generate the configuration file:

   
   ![Cloud Voice, Options panel with the template selector and provisioning link](/images/pbx/gateway-option-cloud.png)

   - **Template**: Pick the matching template from the drop-down list.
   - **Provisioning Link**: Click the copy icon next to the link and keep it somewhere handy, you'll paste it into the gateway in Step 2.

   :::note
   The provisioning link is unique to this gateway. It is what the gateway uses to fetch the configuration file you are building, so the link only works after you save this entry.
   :::

5. Under **Assign Extension**, map extensions to the gateway's ports:

   ![Assigning a range of extensions to a range of gateway ports](/images/pbx/gateway-assign-ext.png)

   1. In **Port Range**, choose the ports you want to fill.
   2. In **Start Extension** and **End Extension**, choose the extension range to hand out across those ports.
   3. Click **Assign Extension**. The port-to-extension pairings appear below.

   :::tip
   If an extension you want isn't in the drop-down, it's probably already tied to another phone or gateway. You can [release it from the current device](/pbx/administrator-guide/release-an-extension-from-a-provisioned-ip-phone-or-gateway/), or [allow the extension to register on more than one device](/pbx/administrator-guide/allow-multiple-registrations-for-one-extension-number/).
   :::

6. Optional. Under **Preference**, adjust these as needed:

   ![Gateway preference options including send key, VoIP server ID, and admin password](/images/pbx/gateway-preference.png)

   - **Key as Send**: Choose the pound key (`#`) or asterisk key (`*`) that a caller presses to tell the gateway the dialed number is complete so it places the call right away.
   - **SIP VoIPServer IDX**: Select the VoIP (Voice over Internet Protocol) server template ID to provision. This is the SIP (Session Initiation Protocol, the signaling standard that sets up and tears down calls) server the gateway will register to.

     :::note
     SIP VoIPServer IDX doesn't apply to the TA100 or TA200.
     :::

   - **Admin Password**: Set the password for the gateway's web interface.
   - **LAN Settings**: Leave at the default (LAN, Local Area Network, the gateway's network settings).

   :::caution
   Set a strong **Admin Password**. The gateway's web interface can be reached over the network, and a weak or default password leaves it open to unauthorized access and toll fraud (someone placing calls at your expense).
   :::

7. Optional. Under **Codecs**, choose the codec list you want the gateway to use. A codec (coder-decoder) is the format that compresses and decompresses call audio.

   ![Codec selection list for the gateway](/images/pbx/gateway-codec.png)

   :::caution
   The codecs you pick here must include at least one codec that the PBX and the far end also support. If the two ends share no common codec, calls connect but you get no audio or one-way audio.
   :::

8. Click **Save**.

## Step 2. Point the gateway at the configuration file

1. Sign in to the gateway's web interface and open **System > System Preferences > Auto Provision Settings**.
2. Under **Provision Method**, set **Server URL** to **Yes**.

   ![Provision method set to use a server URL](/images/pbx/gateway-server-url.png)

3. Under **Server Address**, finish the setup:

   
   ![Cloud Voice, Server address fields with the provisioning URL and schedule](/images/pbx/gateway-server-addr-cloud.png)

   1. In the **Server URL** field, paste the provisioning link you copied from the PBX in Step 1.
   2. Set the time when auto provisioning should run.

4. Click **Save**, then **Apply Changes**.

:::note
The gateway applies the configuration at the scheduled time, not the moment you save. Nothing changes on the gateway until that time arrives.
:::

## Result

When the scheduled time arrives, the gateway downloads its configuration and registers the assigned extensions on the matching ports. You can confirm registration from either end:

- **On the gateway**: Go to **Status > System Status > FXS Port Status**. A registered port shows **OK**.

  ![Gateway FXS port status showing ports registered as OK](/images/pbx/gateway-ext-status.png)

- **On the PBX**: Go to **Extension and Trunk > Extension > Online Status**. A registered extension shows the SIP-connected indicator.

  ![PBX online status list confirming the gateway extensions are registered](/images/pbx/pbx-ext-status.png)
