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

# Telephony events (SIP/PSTN)

> Events for SIP and PSTN dial-in and dial-out session lifecycle.

✓ Prebuilt✓ Custom

These events fire during SIP/PSTN telephony sessions started with [`startDialOut()`](https://docs.daily.co/reference/daily-js/instance-methods/start-dial-out) or triggered by inbound SIP dial-in. See the [dial-in/dial-out guide](https://docs.daily.co/docs/guides/features/dial-in-dial-out) for setup.

***

## Dial-in Events

### dialin-ready

Fires when the SIP worker is ready to receive a call. Only emitted when the room has [SIP dial-in](https://docs.daily.co/docs/guides/features/dial-in-dial-out/sip.md) configured.

**action** `string`

Always `"dialin-ready"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sipEndpoint** `string`

The SIP endpoint URI ready to receive calls (e.g. `"sip:room-name@sip.daily.co"`).

**provider** `string`

The SIP/PSTN provider.

```json theme={null}
// Example event object
{
  "action": "dialin-ready",
  "callClientId": "17225364729060.9442072768918943",
  "sipEndpoint": "sip:room-name@sip.daily.co",
  "provider": "daily"
}
```

***

### dialin-connected

Fires when a SIP or PSTN caller has connected to the Daily room and both endpoints are negotiating media.

> [!NOTE]
>
> `dialin-connected` does not mean media has started flowing — it means the connection request was received and media negotiation is underway.

**action** `string`

Always `"dialin-connected"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sessionId** `string`

Session ID of the dial-in participant.

**sipCallId** `string`

The SIP Call-ID header value.

**provider** `string`

The SIP/PSTN provider.

**userId** `string`

Optional user ID associated with the session.

**sipFrom** `string`

Optional SIP `From` address of the caller.

**sipEndpoint** `string`

Optional SIP endpoint that received the call.

**sipHeaders** `object`

Optional SIP headers from the incoming request.

**actionTraceId** `string`

Optional trace ID for debugging.

```json theme={null}
// Example event object
{
  "action": "dialin-connected",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "a64d30f4-5216-4481-a2ef-515d6dd7dfc6",
  "userId": "user_123",
  "sipFrom": "sip:caller@example.com",
  "sipEndpoint": "sip:room-name@sip.daily.co",
  "sipCallId": "abc123@sip.daily.co",
  "provider": "daily"
}
```

***

### dialin-stopped

Fires when a SIP or PSTN session ends — either the remote end disconnected or the call was terminated.

**action** `string`

Always `"dialin-stopped"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sessionId** `string`

Session ID of the participant whose session ended.

**provider** `string`

The SIP/PSTN provider.

**userId** `string`

Optional user ID associated with the session.

**sipFrom** `string`

Optional SIP `From` address of the caller.

**sipEndpoint** `string`

Optional SIP endpoint that received the call.

**sipHeaders** `object`

Optional SIP headers.

**sipCallId** `string`

Optional SIP Call-ID.

**actionTraceId** `string`

Optional trace ID for debugging.

```json theme={null}
// Example event object
{
  "action": "dialin-stopped",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "a64d30f4-5216-4481-a2ef-515d6dd7dfc6",
  "sipCallId": "abc123@sip.daily.co",
  "provider": "daily"
}
```

***

### dialin-error

Fires when a fatal error occurs in the dial-in pipeline — for example, an SDP negotiation failure.

**action** `string`

Always `"dialin-error"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**errorMsg** `string`

Human-readable error description.

**sessionId** `string`

Session ID of the affected participant.

**provider** `string`

The SIP/PSTN provider.

**type** `string`

Optional error classification. Currently only `'start-failed'`.

**userId** `string`

Optional user ID.

**sipCallId** `string`

Optional SIP Call-ID.

**details** `object`

Optional details object. May contain `sipEndpoint`, plus `sipStatusCode` (number) and
`sipReasonPhrase` (string): the status code and reason phrase of the rejected SIP request
(for dial-in, the REGISTER). Present only when the failure was a SIP rejection. A `408` or `503` may be generated locally on a timeout or transport failure rather than sent by the far end.

**actionTraceId** `string`

Optional trace ID for debugging.

```json theme={null}
// Example event object
{
  "action": "dialin-error",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "Dialin failed with error: SIP registration failed. status code: 403 Forbidden.",
  "sessionId": "a64d30f4-5216-4481-a2ef-515d6dd7dfc6",
  "details": {
    "sipEndpoint": "sip:my-room@my-domain.sip.daily.co",
    "sipStatusCode": 403,
    "sipReasonPhrase": "Forbidden"
  },
  "provider": "daily"
}
```

```json theme={null}
// Example event object when dial-in fails to start
{
  "action": "dialin-error",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "sip dialin start failed",
  "type": "start-failed",
  "details": {
    "sipEndpoint": "sip:my-room@my-domain.sip.daily.co"
  },
  "provider": "daily"
}
```

***

### dialin-warning

Fires for non-fatal dial-in errors, such as when a requested codec is unavailable and a fallback is applied.

**action** `string`

Always `"dialin-warning"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**errorMsg** `string`

Human-readable description of the warning.

**sessionId** `string`

Session ID of the affected participant.

**provider** `string`

The SIP/PSTN provider.

```json theme={null}
// Example event object
{
  "action": "dialin-warning",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "Requested codec unavailable, using fallback",
  "sessionId": "a64d30f4-5216-4481-a2ef-515d6dd7dfc6",
  "provider": "daily"
}
```

***

## Dial-out Events

### dialout-connected

Fires when the outbound call is established and ringing at the remote end.

**action** `string`

Always `"dialout-connected"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sessionId** `string`

Session ID of the dial-out participant.

**sipCallId** `string`

The SIP Call-ID header value.

**provider** `string`

The SIP/PSTN provider.

**destination** `string`

Optional. Phone number in E.164 format or SIP URI of the remote party.

**origin** `string`

Optional. Originating address — phone number in E.164 or SIP URI.

**callerId** `string`

Optional. Caller ID presented to the remote party.

**userId** `string`

Optional user ID associated with the session.

**actionTraceId** `string`

Optional trace ID for debugging.

```json Phone (E.164) theme={null}
{
  "action": "dialout-connected",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "7d208e2a-520b-4a8d-a2c9-3a36dfa0d342",
  "destination": "+12098888888",
  "origin": "+13977888822",
  "callerId": "+13977888822",
  "sipCallId": "abc123@sip.daily.co",
  "provider": "daily"
}
```

```json SIP URI theme={null}
{
  "action": "dialout-connected",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "7d208e2a-520b-4a8d-a2c9-3a36dfa0d342",
  "destination": "sip:callee@example.com",
  "origin": "sip:myroom.0@daily-2358023-app.dapp.signalwire.com",
  "sipCallId": "abc123@sip.daily.co",
  "provider": "daily"
}
```

***

### dialout-answered

Fires when the remote party answers the outbound call.

**action** `string`

Always `"dialout-answered"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sessionId** `string`

Session ID of the dial-out participant.

**sipCallId** `string`

The SIP Call-ID header value.

**provider** `string`

The SIP/PSTN provider.

**destination** `string`

Optional. Phone number in E.164 format or SIP URI of the remote party.

**origin** `string`

Optional. Originating address.

**callerId** `string`

Optional. Caller ID presented to the remote party.

```json Phone (E.164) theme={null}
{
  "action": "dialout-answered",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "7d208e2a-520b-4a8d-a2c9-3a36dfa0d342",
  "destination": "+12098888888",
  "origin": "+13977888822",
  "callerId": "+13977888822",
  "sipCallId": "abc123@sip.daily.co",
  "provider": "daily"
}
```

```json SIP URI theme={null}
{
  "action": "dialout-answered",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "7d208e2a-520b-4a8d-a2c9-3a36dfa0d342",
  "destination": "sip:callee@example.com",
  "origin": "sip:myroom.0@daily-2358023-app.dapp.signalwire.com",
  "sipCallId": "abc123@sip.daily.co",
  "provider": "daily"
}
```

***

### dialout-stopped

Fires when the dial-out session ends — either the remote party hung up or [`stopDialOut()`](https://docs.daily.co/reference/daily-js/instance-methods/stop-dial-out) was called.

**action** `string`

Always `"dialout-stopped"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sessionId** `string`

Session ID of the dial-out participant.

**provider** `string`

The SIP/PSTN provider.

**destination** `string`

Optional. Destination phone number or SIP URI.

**origin** `string`

Optional. Originating address.

**sipCallId** `string`

Optional SIP Call-ID.

```json theme={null}
// Example event object
{
  "action": "dialout-stopped",
  "callClientId": "17225364729060.9442072768918943",
  "sessionId": "7d208e2a-520b-4a8d-a2c9-3a36dfa0d342",
  "destination": "+12098888888",
  "origin": "+13977888822",
  "provider": "daily"
}
```

***

### dialout-error

Fires when a fatal error occurs in the dial-out pipeline.

**action** `string`

Always `"dialout-error"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**errorMsg** `string`

Human-readable error description.

**provider** `string`

The SIP/PSTN provider.

**sessionId** `string`

Optional session ID.

**userId** `string`

Optional user ID.

**sipCallId** `string`

Optional SIP Call-ID.

**details** `object`

Optional details object. May contain `destination`; `sipStatusCode` (number) and
`sipReasonPhrase` (string), the status code and reason phrase of the rejected SIP request
(INVITE, or REGISTER for providers that register before dialing), present only when the
failure was a SIP rejection (a `408` or `503` may be generated locally on a timeout or transport failure rather than sent by the far end); and `sipHeaders`, a map of the custom `X-` SIP headers returned
by the remote SIP endpoint when it rejected the dial-out, useful for debugging and error
interpretation.

**actionTraceId** `string`

Optional trace ID for debugging.

```json theme={null}
// Example event object
{
  "action": "dialout-error",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "DialOut failed with error: SIP dial out failed. status code: 486 Busy Here",
  "sessionId": "22b32b65-cd65-42b2-9665-db05ef3e1255",
  "details": {
    "destination": "+12098888888",
    "sipStatusCode": 486,
    "sipReasonPhrase": "Busy Here",
    "sipHeaders": { "X-Reason": "user busy" }
  },
  "provider": "daily"
}
```

***

### dialout-warning

Fires for non-fatal dial-out errors, such as when a requested codec is unavailable and a fallback is applied.

**action** `string`

Always `"dialout-warning"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**errorMsg** `string`

Human-readable description of the warning.

**provider** `string`

The SIP/PSTN provider.

**sessionId** `string`

Optional session ID of the affected participant.

```json theme={null}
// Example event object
{
  "action": "dialout-warning",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "Requested codec unavailable, using fallback",
  "sessionId": "7d208e2a-520b-4a8d-a2c9-3a36dfa0d342",
  "provider": "daily"
}
```

***

## See also

> [card] Methods
>
> * [startDialOut()](https://docs.daily.co/reference/daily-js/instance-methods/start-dial-out.md)
> * [stopDialOut()](https://docs.daily.co/reference/daily-js/instance-methods/stop-dial-out.md)

> [card] Guides
>
> * [Events](https://docs.daily.co/docs/daily-js/concepts/events.md)
> * [Dial-in/Dial-out Overview](https://docs.daily.co/docs/guides/features/dial-in-dial-out)
> * [daily-js: Dial-in and dial-out](https://docs.daily.co/docs/daily-js/features/dialin-dialout.md)


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