> ## 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.

# startDialOut()

> Initiates an outbound SIP or PSTN call from a Daily room.

`startDialOut(options)`

✓ Prebuilt✓ Custom

The dialed participant joins the room as a regular participant. Requires the initiating participant to be [an owner or admin](https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token.md#body-properties-permissions).

## Parameters

`options: DailyStartDialoutSipOptions | DailyStartDialoutPhoneOptions`

Provide either `sipUri` (SIP) or `phoneNumber` (PSTN) — not both. Fields marked as SIP-only or PSTN-only are ignored when used with the wrong option type.

### `DailyStartDialoutSipOptions`

**sipUri** `string`

The SIP URI to dial (e.g. `sip:bob@example.com`). Must conform to [RFC 3261](https://tools.ietf.org/html/rfc3261#section-25). Query parameters appended to the URI appear as `X-` SIP headers in the invite (e.g. `sip:bob@example.com?X-myHeader=value`).

**displayName** `string`

Display name shown for the participant when they join. Defaults to the SIP username from the URI.

**userId** `string`

Custom identifier for the participant (max 36 characters). See [userId guidance](https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token.md#body-properties-user-id).

**video** `boolean`

Enable/disable SIP video.

**videoSettings** `DailySipVideoSettings`

Video settings for the SIP participant. Only applicable when `video` is `true`.

* `width`: video width in pixels. Default and maximum: `1280`, or `720` with `sip-portrait`.
* `height`: video height in pixels. Default and maximum: `720`, or `1280` with `sip-portrait`.
* `fps`: video frame rate. Default: `15`. Maximum: `30`.
* `videoBitrate`: video bitrate in kbps. Default: `900`. Maximum: `1000`.
* `layout`: what the SIP participant sees and hears. See [SIP video layout](#sip-video-layout). Default: `sip-active` with one camera.

**codecs** `DailyDialOutCodecs`

Preferred codecs. The first entry in each array is used; if the remote party doesn't support it, the stream is transcoded (transcoding charges may apply).

* `codecs.audio`: `'PCMU' | 'OPUS' | 'G722' | 'PCMA'[]`. Default: `['OPUS']`.
* `codecs.video`: `'H264' | 'VP8'[]`. Default: `['H264']`.

**permissions** `DailySipPstnParticipantPermissions`

Controls which participants' media the dialed-in SIP participant can receive. Uses the same `canReceive` shape as [participant permissions](https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token.md#body-properties-permissions).

**provider** `'signalwire' | 'daily'` (default: 'signalwire')

The SIP provider for this dial-out. `'daily'` dials the `sipUri` through the Daily SIP provider, the recommended choice for SIP dial-out. See [SIP providers](https://docs.daily.co/docs/guides/features/dial-in-dial-out#sip-providers) for what each provider supports.

> [!NOTE]
>
> `provider` applies to `sipUri` dial-out. With `phoneNumber`, only `'signalwire'` is accepted and `'daily'` throws. PSTN dial-out always uses SignalWire.

### SIP video layout

`videoSettings.layout: DailySipVideoLayoutConfig`

Pick a preset, then narrow it with participant references. A participant reference is a participant's `user_id` or session id. The `user_id` is matched first, so it survives a rejoin and may name a participant who has not joined yet. The SIP participant is named by the dial's `userId`. Their own camera is sent only when a reference names it, never through `'*'`, and their own audio is never sent back to them.

**preset** `'sip-active' | 'sip-grid' | 'sip-single' | 'sip-portrait'` *required*

* `'sip-active'` — the most recently active cameras, current speaker large. The default.
* `'sip-grid'` — cameras in `participants.video` order, in a grid.
* `'sip-single'` — one participant's video and audio.
* `'sip-portrait'` — a 720x1280 composition unless `width` (up to 720) or `height` (up to 1280) is given: two cameras stacked, or one full-frame with a small inset tile.

**maxCamStreams** `number`

Cameras to composite. `sip-active` and `sip-grid`: 1 to 4, default 4. `sip-portrait`: 1 to 2, default 2, and must be 2 with `insetParticipant`. Not allowed with `sip-single`.

**participants** `\{ video?: string[]; audio?: string[] \}`

Who to include. Not allowed with `sip-single`. Entries are `'*'` (everyone), `'owners'`, or participant references, in order, up to 50 per list.

* `video`: cameras. Default `['*']`; `sip-portrait` defaults to `['owners', '*']`.
* `audio`: audio sources. Default `['*']`.

**videoParticipant** `string`

`sip-single` only, required. The participant whose video is sent; also the audio source unless `audioParticipant` is set.

**audioParticipant** `string`

`sip-single` only. The participant whose audio is sent instead of `videoParticipant`'s.

**variant** `'vertical' | 'inset'` (default: 'vertical')

`sip-portrait` only. `'vertical'` stacks up to two cameras; `'inset'` shows one camera full-frame with the other in a small tile.

**mainParticipant** `string`

`sip-portrait` with `variant: 'inset'` only. Pins a participant full-frame. Unpinned, the main slot follows the most recent speaker.

**insetParticipant** `string`

`sip-portrait` with `variant: 'inset'` only. Pins a participant to the small tile; must differ from `mainParticipant`. Unpinned, the tile shows the first participant `participants.video` selects.

### `DailyStartDialoutPhoneOptions`

**phoneNumber** `string`

The E.164 phone number to call (e.g. `+12268077097`).

**displayName** `string`

Display name shown for the participant when they join. Defaults to the phone number.

**userId** `string`

Custom identifier for the participant (max 36 characters). See [userId guidance](https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token.md#body-properties-user-id).

**callerId** `string`

The `id` of a [purchased phone number](https://docs.daily.co/reference/rest-api/phone-numbers/list-purchased.md) on the domain, not the phone number itself. The phone number associated with this `id` is displayed as the caller ID on the called device. Defaults to the oldest purchased number on the domain.

**extension** `string`

Extension to dial after the call connects. Max 20 characters.

**waitBeforeExtensionDialSec** `number`

Seconds to wait after connecting before dialing the extension.

**codecs** `DailyDialOutCodecs`

Preferred codecs. The first entry in each array is used; if the remote party doesn't support it, the stream is transcoded (transcoding charges may apply).

* `codecs.audio`: `'PCMU' | 'OPUS' | 'G722' | 'PCMA'[]`. Default: `['PCMU', 'PCMA']`.
* `codecs.video`: not applicable for PSTN.

**permissions** `DailySipPstnParticipantPermissions`

Controls which participants' media the dialed-in PSTN participant can receive. Uses the same `canReceive` shape as [participant permissions](https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token.md#body-properties-permissions).

## Return value

Returns a `Promise` that resolves to `{ session?: DailyDialOutSession }`, where `session.sessionId` is the UUID identifying the initiated SIP/PSTN session.

## Errors

* `NOT_ALLOWED` — SIP/PSTN is not enabled for the room.
* `DIALOUT_IN_PROGRESS` — A dial-out is already in progress.
* `TEMPORARILY_NOT_AVAILABLE` — No workers available; try again shortly.

## Examples

```javascript theme={null}
// SIP call through the Daily SIP provider
const { session } = await call.startDialOut({
  sipUri: 'sip:bob@example.com',
  provider: 'daily',
});

// SIP call through SignalWire, the default
const { session } = await call.startDialOut({ sipUri: 'sip:bob@example.com' });

// SIP video call with custom display name
const { session } = await call.startDialOut({
  sipUri: 'sip:boardroom@example.com',
  provider: 'daily',
  video: true,
  displayName: 'Board Room',
  codecs: { video: ['H264'], audio: ['OPUS'] },
  videoSettings: { width: 1280, height: 720, fps: 15, videoBitrate: 900 },
});

// SIP video call: the interpreter sees the patient full-frame and the doctor in a small tile
const { session } = await call.startDialOut({
  sipUri: 'sip:interpreter@relay.example.com',
  video: true,
  videoSettings: {
    layout: {
      preset: 'sip-portrait',
      variant: 'inset',
      mainParticipant: 'patient-42', // user_id from the patient's meeting token
      insetParticipant: 'doctor-7',
    },
  },
});

// SIP video call that shows only the room owners, in a grid
const { session } = await call.startDialOut({
  sipUri: 'sip:boardroom@example.com',
  video: true,
  videoSettings: {
    layout: { preset: 'sip-grid', participants: { video: ['owners'] } },
  },
});

// PSTN call with extension
const { session } = await call.startDialOut({
  phoneNumber: '+12268077097',
  displayName: 'Support Line',
  extension: '1234',
  waitBeforeExtensionDialSec: 4,
});
```

## See also

> [card] Methods
>
> * [stopDialOut()](https://docs.daily.co/reference/daily-js/instance-methods/stop-dial-out.md)
> * [sipCallTransfer()](https://docs.daily.co/reference/daily-js/instance-methods/sip-call-transfer.md)
> * [sipRefer()](https://docs.daily.co/reference/daily-js/instance-methods/sip-refer.md)

> [card] Events
>
> * [dialout-connected](https://docs.daily.co/reference/daily-js/events/telephony-events.md#dialout-connected)
> * [dialout-stopped](https://docs.daily.co/reference/daily-js/events/telephony-events.md#dialout-stopped)
> * [dialout-error](https://docs.daily.co/reference/daily-js/events/telephony-events.md#dialout-error)

> [card] Guides
>
> * [Dial-in / dial-out](https://docs.daily.co/docs/guides/features/dial-in-dial-out)
> * [SIP providers](https://docs.daily.co/docs/guides/features/dial-in-dial-out#sip-providers)

> [card] REST API
>
> * [Update room: enable\_dialout](https://docs.daily.co/reference/rest-api/rooms/update-room.md#body-properties-enable-dialout)
> * [Start dial-out](https://docs.daily.co/reference/rest-api/rooms/dial-out/start.md)
> * [dialout-answered webhook](https://docs.daily.co/reference/rest-api/webhooks/events/dialout-answered.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.