# How to configure a telephony channel

Configure a telephony channel to process customer calls in ConnectiveOne. After setup, calls are saved as dialogs in the Operator Panel, where operators can view history, listen to recordings, and read transcripts.

## Prerequisites

- Access to bot settings in ConnectiveOne
- Access to your telephony provider admin panel
- Webhook URL and token for connection

## When to use it

- You need to connect telephony to ConnectiveOne
- You need to keep call history together with other communication channels
- You need operators to access call recordings and transcripts

## Main interface elements

- **Telephony channel** — settings for connecting a telephony provider
- **Webhook URL** — the address where the provider sends call events
- **Webhook Token** — the token used to verify requests securely
- **Advanced Config** — JSON configuration for mapping provider fields
- **Webhook enrich action** — an optional action that enriches call data before the dialog is created
- **Enrich error action** — what to do if the webhook enrich action fails

## Step 1: Open telephony settings

1. Go to **Settings** -> **Bots**.
2. Select the bot you need.
3. Open the **Telephony** tab.

## Step 2: Create a channel

1. Click **Create channel**.
2. Enter a channel name, for example `Main telephony`.
3. Enable **Active** if the channel should start working now.

## Step 3: Configure the webhook

1. Copy **Webhook URL**. It is generated automatically.
2. Copy **Webhook Token**. It is also generated automatically.
3. In your telephony provider admin panel, configure the webhook:
   - Paste the copied Webhook URL.
   - Add the token to the URL or configure verification according to your provider documentation.
4. Select the data format: **JSON** or **Form-urlencoded**, depending on what your provider supports.

## Step 4: Configure field mapping in Advanced Config

Field mapping tells the system which provider webhook fields match ConnectiveOne call fields.

1. In **Advanced Config**, open the JSON editor.
2. Configure `field_mapping`:

```json
{
  "field_mapping": {
    "call_id": "call_id",
    "caller_number": "caller",
    "callee_number": "callee",
    "operator_id": "manager_id",
    "status": "status",
    "duration": "call_duration",
    "recording_url": "recording_url",
    "transcript_text": "transcript"
  }
}
```

The exact field names depend on how your provider names them in the webhook.

3. If needed, configure status mapping:

```json
{
  "status_mapping": {
    "PROPER": "answered",
    "MISSED": "missed"
  }
}
```

4. If needed, configure call direction mapping:

```json
{
  "direction_mapping": {
    "in": "in",
    "out": "out"
  }
}
```

## Step 5: Configure phone number normalization

1. In **Number normalization**, select the default country code, for example `+380` for Ukraine.
2. Phone numbers use the **E.164** format. The system normalizes numbers to this format automatically.

## Step 6: Configure webhook enrichment

Use webhook enrichment when you need to get the operator email, call topic, or other data from an external system.

1. Prepare the action in **Action Jail**. This is usually done together with the implementation team.
2. In the channel form, select it in **Webhook enrich action**.
3. In **Enrich error action**, select what should happen if the action fails:
   - **Do not assign or auto-transcribe** — the dialog is created without an assigned operator; **Auto transcription** does not start for this call.
   - **Assign administrator and run auto-transcription** — the dialog is assigned to the default administrator (root admin), and then **Auto transcription** can start.

Detailed instruction: [How to configure webhook enrichment](/en/telephony/how-to/configure-webhook-enrich.md).

## Step 7: Save and test

1. Click **Save**.
2. Click **Test** to check webhook processing.
3. Check that the test dialog was created successfully.

## Additional settings

### Recordings

If your provider sends call recordings, configure them in Advanced Config:

```json
{
  "recordings": {
    "enabled": true,
    "download": false
  }
}
```

- `enabled: true` — enable recording processing
- `download: false` — save only the URL and do not download the file

### Transcripts

If your provider sends call transcripts, configure them in Advanced Config:

```json
{
  "transcription": {
    "enabled": true,
    "source": "provider"
  }
}
```

- `enabled: true` — enable transcript processing
- `source: "provider"` — the transcript is provided by the telephony provider

## Check that it works

After setup, check:

1. **Channel status** — it should be active.
2. **Test webhook** — it should create a test dialog.
3. **Real call** — after the call ends, it should appear in the Operator Panel.

## Related articles

- [Configure webhook enrichment](/en/telephony/how-to/configure-webhook-enrich.md)
