# Set up Communication Between Hikvision Door Station and Indoor Station

Once both Hikvision endpoints are registered to Cloud Voice, a short round of configuration turns them into a working door-entry intercom: a visitor at the door can ring the indoor station, you can answer with video, and you can release the door from the indoor unit.

## Before you begin

Both devices must already exist as extensions on your Cloud Voice system. If you have not registered them yet, complete these steps first:

- [Register a Hikvision door station to Cloud Voice](/pbx/integrations/hikvision/register-hikvision-ds-kd8003-door-station-to-cloud-voice/)
- [Register a Hikvision indoor station to Cloud Voice](/pbx/integrations/hikvision/register-hikvision-ds-kh6320-indoor-station-to-cloud-voice/)

:::note
Before you start, write down the SIP extension number of the indoor station and the room number it serves. You will need both in Step 1. SIP (Session Initiation Protocol) is the standard that sets up voice and video calls, and every registered device has its own SIP extension number.
:::

## Step 1. Point the door station's call button at the indoor station

The door station needs to know which extension to dial when someone presses its call button. You define that number in the door station's own configuration, not in Cloud Voice.

:::note
The iVMS-4200 client is Hikvision's own device-management software, and it is where you configure the door station itself. Cloud Voice handles the call routing between the two extensions; the dial mapping in this step lives on the door station.
:::

1. Sign in to the iVMS-4200 client and open **Device Management > Device**. Next to your DS-KD8003 door station, click the remote configuration icon to open its **Configuration** page.

   ![Remote configuration icon beside a device in the iVMS-4200 list](/images/pbx/remote-config-icon.png)

2. Go to **Intercom > Number Settings** and click **Add** to register the indoor station as an intercom target.

   ![Number Settings page on the door station with the Add button](/images/pbx/door-station-number-setting-page.png)

3. In the dialog that opens, describe the indoor station:
   - **Room No.**: The room number where the indoor station is installed. This is a label the door station uses to identify the unit.
   - **SIP1**: The SIP extension number assigned to the DS-KH6320 indoor station. This is the field that actually routes the call. In this example, enter `1667`.

   ![Intercom dialog mapping the indoor station's room number and SIP extension](/images/pbx/door-station-call2-indoor-station.png)

   :::tip
   Enter the indoor station's real extension number in **SIP1**, not the room number. If the two ever differ, the room number is only a display label, while **SIP1** is what the door station dials.
   :::

4. Click **OK**.

## Step 2. Match the codecs on both sides

A codec (coder/decoder) is the format used to compress and carry the audio and video of a call. Both ends of a call must offer at least one codec in common, so set video to H.264 and audio to G.711 u-law in both the door station and Cloud Voice.

:::caution
The codecs must match on both the door station and Cloud Voice. If they do not share the same audio and video codecs, the call can fail, or you may get one-way audio or no video. Change both sides before you test.
:::

### On the Hikvision door station

1. On the **Configuration** page, open **Video/Audio**.
2. On the **Video** tab, set **Video Encoding** to **H.264**.

   ![Video Encoding set to H.264 on the door station](/images/pbx/door-station-video-codec.png)

3. On the **Audio** tab, set **Audio Encoding** to **G.711ulaw**.

   ![Audio Encoding set to G.711 u-law on the door station](/images/pbx/door-station-audio-codec.png)

4. Click **Save**.

### On Cloud Voice

1. Open the Cloud Voice management portal and go to **PBX Settings > SIP Settings > Codec**.
2. Move **u-law** and **H264** from the **Available** list into the **Selected** list.

   ![Codec settings in Cloud Voice with u-law and H264 in the selected list](/images/pbx/pbx-codec-setting.png)

3. Click **Save**, then **Apply**.

   :::caution
   These are system-wide SIP settings that affect every extension, not just the Hikvision devices. Applying the change can briefly interrupt calls in progress while the SIP service reloads, so make the change during a quiet period.
   :::

## What you get

- When a visitor presses the call button on the door station, the call rings through to the indoor station, where you can answer and see the visitor on video.
- While the call is connected, tap the unlock key on the indoor station to open the door.
