# Connecting to an Assistant

Connect callers to an Assistant through a SIP Channel for phone calls or a WebRTC Channel for browser and app conversations.

## What is a Channel?

A Channel stores the routing configuration between a communication endpoint and an Assistant. Callers use your phone system or WebRTC client, and Reecall routes the connection to the assigned Assistant.

<Mermaid chart={`flowchart LR
    subgraph Endpoints
        SIP[SIP Trunk]
        WEB[WebRTC Client]
    end
    
    subgraph Channels
        SIPC[SIP Channel]
        WEBC[WebRTC Channel]
    end
    
    SIP --> SIPC
    WEB --> WEBC
    SIPC --> Asst[Assistant]
    WEBC --> Asst`} />

***

## Channel types

| Type       | Use Case                          | Infrastructure                                  |
| ---------- | --------------------------------- | ----------------------------------------------- |
| **SIP**    | Phone calls via SIP               | Automatically provisions SIP trunks and routing |
| **WEBRTC** | Browser/app-based real-time audio | WebRTC audio with WebSocket signalling                |

***

## Key concepts

* **One Assistant, multiple Channels**: A single Assistant can have both a SIP and a WEBRTC Channel simultaneously
* **One Channel per type**: An Assistant can only be associated with one Channel of each type
* **Automatic SIP provisioning**: Creating a SIP Channel provisions its inbound trunk and dispatch rule. A WebRTC Channel is used when requesting a connection token.

***

## Channel configuration

Each Channel type has specific configuration requirements:

### SIP Channel

Requires `name`, `type: "SIP"`, and `assistantId`, plus at least one non-empty whitelist:

* `inboundNumbersWhitelist` - Provider phone numbers (destination numbers you own) that the trunk accepts calls for
* `inboundAddressesWhitelist` - IP addresses or CIDR ranges allowed to send SIP traffic

### WEBRTC Channel

Requires:

* `name` - Display name for the Channel
* `type` - `WEBRTC`
* `assistantId` - The Assistant to connect

## What's next

- [SIP Channel](/docs/sip-channel)
- [WebRTC Channel](/docs/webrtc-channel)
