> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# SIP dial-in and dial-out

> Configure SIP audio and video dial-in and dial-out for Daily rooms, including multiple SIP endpoints and dynamic display names.

Daily supports both SIP dial-in and SIP dial-out. See the [overview](/docs/guides/features/dial-in-dial-out) for prerequisites and codec information.

## SIP dial-in (audio only)

### Single SIP endpoint

Set the `sip` [room property](/reference/rest-api/rooms/update-room#body-properties-sip) to enable SIP dial-in:

```bash theme={null}
curl --request POST \
  --url https://api.daily.co/v1/rooms/your-room-name \
  --header 'Authorization: Bearer $DAILY_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"properties": {"sip": {"sip_mode": "dial-in", "display_name": "SIP Participant"}}}'
```

The response includes [a read-only `sip_uri.endpoint`](/reference/rest-api/rooms/get-room#response-config-sip-uri) — the SIP address your client dials:

```json theme={null}
{
  "config": {
    "sip_uri": {
      "endpoint": "sip:123456780@example.sip.daily.co"
    },
    "sip": {
      "sip_mode": "dial-in",
      "display_name": "SIP Participant"
    }
  }
}
```

Set `sip` to `null` to disable SIP on a room.

### Multiple SIP endpoints

Use `num_endpoints` to provision multiple SIP dial-in addresses. Each SIP and PSTN connection counts toward the `max_sip_pstn_sessions_per_room` limit (default: 5).

```bash theme={null}
curl --request POST \
  --url https://api.daily.co/v1/rooms/your-room-name \
  --header 'Authorization: Bearer $DAILY_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"properties": {"sip": {"sip_mode": "dial-in", "display_name": "SIP Participant", "num_endpoints": 2}}}'
```

The response includes `sip_uri.extra_endpoints` with additional SIP addresses:

```json theme={null}
{
  "config": {
    "sip_uri": {
      "endpoint": "sip:123456780@example.sip.daily.co",
      "extra_endpoints": ["sip:abcdefg@example.sip.daily.co"]
    }
  }
}
```

## SIP dial-in (audio and video)

Set `video: true` to enable video SIP dial-in. You can also specify codecs explicitly:

```bash theme={null}
curl --request POST \
  --url https://api.daily.co/v1/rooms/your-room-name \
  --header 'Authorization: Bearer $DAILY_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "properties": {
      "sip": {
        "display_name": "sip-user",
        "sip_mode": "dial-in",
        "video": true,
        "codecs": {
          "audio": ["OPUS"],
          "video": ["H264"]
        }
      }
    }
  }'
```

If the remote party doesn't support the specified codec, Daily transcodes the stream (transcoding charges apply). See our [pricing page](https://www.daily.co/pricing/) for details.

## Dynamic display names

`display_name` is set at room creation time. To pass a name at dial time instead, append it as a URL-encoded query parameter on the SIP URI:

```
sip:123456780@example.sip.daily.co?x-daily_display_name=my%20user%20name
```

Use [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) to encode the name. If `x-daily_display_name` is not passed, the room-level `display_name` is used.

## Testing SIP dial-in

Below describes the SIP dial-in flow for a room with one SIP endpoint. For multiple endpoints, the flow is the same but with additional `dialin-ready` events and SIP URIs.

1. A session starts and the SIP worker registers with the SIP network.
2. The [`dialin-ready`](/reference/daily-js/events/telephony-events#dialin-ready) event fires for each registered SIP URI.
3. After `dialin-ready`, your SIP client dials the `sip_uri.endpoint`.

**Notes:**

* Each `sip_uri` endpoint can only be used by one SIP client at a time.
* After a disconnect, the same `sip_uri` can be redialed.
* When the Daily session ends, all SIP connections are terminated.

## SIP dial-out

A Daily room can dialout to a one or more `"sipUri"`. You can initiate dial-out from the client SDK or REST API. See the [overview](/docs/guides/features/dial-in-dial-out) for details on dial-out prerequisites and supported codecs.

**Dial out audio-only:**

```bash theme={null}
curl -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DAILY_API_KEY" \
  -XPOST -d '{"sipUri": "sip:user@example.calls.webex.com"}' \
  https://api.daily.co/v1/rooms/$ROOM_NAME/dialOut/start
```

**Dial out with video enabled:**

```bash theme={null}
curl -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DAILY_API_KEY" \
  -XPOST -d '{"sipUri": "sip:user@example.calls.webex.com", "video": true, "codecs": {"audio": ["OPUS"], "video": ["H264"]}}' \
  https://api.daily.co/v1/rooms/$ROOM_NAME/dialOut/start
```

SIP URIs must be prefixed with `sip:`. You can also use [`startDialOut()`](/reference/daily-js/instance-methods/start-dial-out) from the client SDK.

## Call transfers

For transferring SIP calls to another room or external SIP/PSTN endpoint, see the [transfers guide](/docs/guides/features/dial-in-dial-out/transfers).
