# Provision an Avaya IP Phone

Auto provisioning lets Cloud Voice deliver a phone's configuration from the server, so you don't have to key settings in on the handset. Avaya phones locate that configuration through DHCP (Dynamic Host Configuration Protocol) option 242 rather than the plug-and-play discovery used by most other vendors, so provisioning them takes two parts: adding the phone in Cloud Voice, then telling your DHCP server where the phone should fetch its files. This page uses an Avaya J139 (firmware 4.1.5.0.6) as the working example; the same steps apply to the other supported models.

## Supported models and firmware

Confirm that both the phone and Cloud Voice meet the minimum firmware versions below before you start.

| Model | Phone firmware | Cloud Voice version |
|-------|----------------|---------------------|
| J129 | 4.1.1.0.7 or later | 84.16.0.70 or later |
| J139 | 4.1.1.0.7 or later | 84.16.0.70 or later |
| J159 | 4.1.1.0.7 or later | 84.16.0.70 or later |
| J169 | 4.1.1.0.7 or later | 84.16.0.70 or later |
| J179 | 4.1.1.0.7 or later | 84.16.0.70 or later |
| J189 | 4.1.1.0.7 or later | 84.16.0.70 or later |
| 9608 | 7.1.15.2.1 or later | 84.16.0.70 or later |
| 9611G | 7.1.15.2.1 or later | 84.16.0.70 or later |
| 9641G | 7.1.15.2.1 or later | 84.16.0.70 or later |

## Before you start

- Have a DHCP server running on the same subnet as the phone so it can lease the phone an IP address.

  :::note
  Only one DHCP server may run on the subnet. If a second one is active, the phone can't reliably obtain an address.
  :::

- If the phone was used previously, factory-reset it first.

  :::caution
  A factory reset erases the phone's current settings and registration. Confirm you have the right handset and that it is not in service elsewhere before you reset it.
  :::
- Collect the phone's details: vendor, model, and MAC (Media Access Control) address. The MAC address is the phone's unique hardware identifier, usually printed on a label on the underside of the phone.
- Download the default auto provisioning template for your phone model. The templates live under **Auto Provisioning > Resource Repository > Default Templates**.
- On the extension you plan to assign, set the **Registration Name** to match the **Extension Number**. Edit the extension under **Extension and Trunk > Extension**, then open **User > Extension Information**.

  :::caution
  Avaya phones require the **Registration Name** and **Extension Number** to be identical. If they differ, the extension won't register.
  :::

  ![Extension information page with the registration name set to match the extension number](/images/pbx/avaya-extension.png)

## Step 1: Add the Avaya phone in Cloud Voice

Adding the phone generates a configuration file keyed to its MAC address.

1. Sign in to the Cloud Voice web portal and go to **Auto Provisioning > Phones**.
2. Click **Add > Add**.
3. In the **IP Phone** section, fill in the phone's details.

   ![Adding an Avaya phone by vendor, model, and MAC address](/images/pbx/add-avaya-phone.png)

   - **Vendor**: Choose **Avaya**.
   - **Model**: Pick your phone model. This example uses **J139**.
   - **MAC Address**: Type the phone's MAC address.

4. In the **Options** section, set the following.

   
   ![Cloud Voice, template and provisioning link options for an Avaya phone](/images/pbx/avaya-phone-option-cloud.png)

   - **Template**: Select a template from the drop-down list.

     :::note
     Use the default template that matches your phone model, or build your own custom auto provisioning template.
     :::

   - **Provisioning Link**: This link is generated automatically and points to where the phone's configuration file is stored.

     :::note
     Make a note of the provisioning link. You'll need it when you configure DHCP option 242 in Step 2.
     :::

5. In the **Assign Extension** section, assign an extension to the phone.

   ![Assigning an extension to the phone during provisioning](/images/pbx/assign-an-extension-pnp.png)

   :::tip
   If the extension you want isn't in the drop-down list, it's already tied to another IP phone. You have two ways to free it up:

   - Release the extension from the phone it's currently associated with.
   - Enable concurrent registration for that extension, which lets it register on more than one device. By default, Cloud Voice permits an extension to register with only one SIP (Session Initiation Protocol) endpoint, meaning one registered phone or app.
   :::

6. Click **Save**. The phone now appears in the Auto Provisioning phone list.
7. Set the phone's display language.

   a. In the phone list, click the edit icon next to the Avaya phone.

      ![Auto provisioning list showing the added Avaya phone](/images/pbx/avaya-phone-setting.png)

   b. On the phone configuration page, scroll to the **Preference** section and choose the language for your phone model.

      ![Selecting the display language in the phone's preference settings](/images/pbx/set-avaya-phone-language.png)

   c. Click **Save**.

## Step 2: Configure DHCP option 242

Option 242 tells the Avaya phone where to reach Cloud Voice, so it can retrieve its configuration files on its own. The steps below use the Tftpd64 DHCP server as an example.

1. In Tftpd64, go to **Settings > DHCP > DHCP Options**.
2. Add option 242 and set it to the location of the configuration files.

   ![DHCP options dialog with option 242 added and its string value set](/images/pbx/avaya-option-242-cloud.png)

   a. In the **Additional Option** field, enter `242`.
   b. In the string value field, enter the provisioning link you noted in Step 1, using this format:

      ```
      TLSSRVR=your-pbx.example.com,TLSDIR=api/autoprovision/lgjnRL8CkoYFXWJd,TLSPORT=443,SIG=2
      ```

      Each parameter is one of Avaya's provisioning settings. The `TLS` prefix stands for Transport Layer Security, the encrypted connection the phone uses to reach the server.

      - **TLSSRVR**: The Cloud Voice domain name.
      - **TLSDIR**: The file path on the server, for example `api/autoprovision/lgjnRL8CkoYFXWJd`.
      - **TLSPORT**: The server port.
      - **SIG**: The Avaya phone's software version. Set this to `2`.

3. Click **OK** to save.

## Result

- When the phone reboots, it leases an IP address from the DHCP server, downloads its configuration from Cloud Voice over the provisioning link, and applies the settings automatically.
- The extension registers successfully on the phone. To confirm, check the registration status under **Auto Provisioning > Phones** in the web portal.

  ![Auto provisioning list showing the Avaya phone with a registered extension](/images/pbx/avaya-phone-register-ok-1.png)
