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

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

These events fire during SIP/PSTN telephony sessions started with [`startDialOut()`](/reference/daily-js/instance-methods/start-dial-out) or triggered by inbound SIP dial-in. See the [dial-in/dial-out guide](/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](/docs/guides/features/dial-in-dial-out/sip) configured.

<ResponseField name="action" type="string">
  Always `"dialin-ready"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="sipEndpoint" type="string">
  The SIP endpoint URI ready to receive calls (e.g. `"sip:room-name@sip.daily.co"`).
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

```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.
</Note>

<ResponseField name="action" type="string">
  Always `"dialin-connected"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the dial-in participant.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  The SIP Call-ID header value.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="userId" type="string">
  Optional user ID associated with the session.
</ResponseField>

<ResponseField name="sipFrom" type="string">
  Optional SIP `From` address of the caller.
</ResponseField>

<ResponseField name="sipEndpoint" type="string">
  Optional SIP endpoint that received the call.
</ResponseField>

<ResponseField name="sipHeaders" type="object">
  Optional SIP headers from the incoming request.
</ResponseField>

<ResponseField name="actionTraceId" type="string">
  Optional trace ID for debugging.
</ResponseField>

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

<ResponseField name="action" type="string">
  Always `"dialin-stopped"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the participant whose session ended.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="userId" type="string">
  Optional user ID associated with the session.
</ResponseField>

<ResponseField name="sipFrom" type="string">
  Optional SIP `From` address of the caller.
</ResponseField>

<ResponseField name="sipEndpoint" type="string">
  Optional SIP endpoint that received the call.
</ResponseField>

<ResponseField name="sipHeaders" type="object">
  Optional SIP headers.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  Optional SIP Call-ID.
</ResponseField>

<ResponseField name="actionTraceId" type="string">
  Optional trace ID for debugging.
</ResponseField>

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

<ResponseField name="action" type="string">
  Always `"dialin-error"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="errorMsg" type="string">
  Human-readable error description.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the affected participant.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="type" type="string">
  Optional error classification. Currently only `'start-failed'`.
</ResponseField>

<ResponseField name="userId" type="string">
  Optional user ID.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  Optional SIP Call-ID.
</ResponseField>

<ResponseField name="details" type="object">
  Optional details object. May contain `sipEndpoint`.
</ResponseField>

<ResponseField name="actionTraceId" type="string">
  Optional trace ID for debugging.
</ResponseField>

```json theme={null}
// Example event object
{
  "action": "dialin-error",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "SDP negotiation failed",
  "sessionId": "a64d30f4-5216-4481-a2ef-515d6dd7dfc6",
  "type": "start-failed",
  "provider": "daily"
}
```

***

### dialin-warning

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

<ResponseField name="action" type="string">
  Always `"dialin-warning"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="errorMsg" type="string">
  Human-readable description of the warning.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the affected participant.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

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

<ResponseField name="action" type="string">
  Always `"dialout-connected"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the dial-out participant.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  The SIP Call-ID header value.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="destination" type="string">
  Optional. Phone number in E.164 format or SIP URI of the remote party.
</ResponseField>

<ResponseField name="origin" type="string">
  Optional. Originating address — phone number in E.164 or SIP URI.
</ResponseField>

<ResponseField name="callerId" type="string">
  Optional. Caller ID presented to the remote party.
</ResponseField>

<ResponseField name="userId" type="string">
  Optional user ID associated with the session.
</ResponseField>

<ResponseField name="actionTraceId" type="string">
  Optional trace ID for debugging.
</ResponseField>

<CodeGroup>
  ```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"
  }
  ```
</CodeGroup>

***

### dialout-answered

Fires when the remote party answers the outbound call.

<ResponseField name="action" type="string">
  Always `"dialout-answered"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the dial-out participant.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  The SIP Call-ID header value.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="destination" type="string">
  Optional. Phone number in E.164 format or SIP URI of the remote party.
</ResponseField>

<ResponseField name="origin" type="string">
  Optional. Originating address.
</ResponseField>

<ResponseField name="callerId" type="string">
  Optional. Caller ID presented to the remote party.
</ResponseField>

<CodeGroup>
  ```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"
  }
  ```
</CodeGroup>

***

### dialout-stopped

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

<ResponseField name="action" type="string">
  Always `"dialout-stopped"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session ID of the dial-out participant.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="destination" type="string">
  Optional. Destination phone number or SIP URI.
</ResponseField>

<ResponseField name="origin" type="string">
  Optional. Originating address.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  Optional SIP Call-ID.
</ResponseField>

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

<ResponseField name="action" type="string">
  Always `"dialout-error"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="errorMsg" type="string">
  Human-readable error description.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Optional session ID.
</ResponseField>

<ResponseField name="userId" type="string">
  Optional user ID.
</ResponseField>

<ResponseField name="sipCallId" type="string">
  Optional SIP Call-ID.
</ResponseField>

<ResponseField name="details" type="object">
  Optional details object. May contain `destination`.
</ResponseField>

<ResponseField name="actionTraceId" type="string">
  Optional trace ID for debugging.
</ResponseField>

```json theme={null}
// Example event object
{
  "action": "dialout-error",
  "callClientId": "17225364729060.9442072768918943",
  "errorMsg": "DialOut failed with error: process error, Channel closed",
  "sessionId": "22b32b65-cd65-42b2-9665-db05ef3e1255",
  "details": { "destination": "+12098888888" },
  "provider": "daily"
}
```

***

### dialout-warning

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

<ResponseField name="action" type="string">
  Always `"dialout-warning"`.
</ResponseField>

<ResponseField name="callClientId" type="string">
  The ID of the call client instance that emitted this event.
</ResponseField>

<ResponseField name="errorMsg" type="string">
  Human-readable description of the warning.
</ResponseField>

<ResponseField name="provider" type="string">
  The SIP/PSTN provider.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Optional session ID of the affected participant.
</ResponseField>

```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

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [startDialOut()](/reference/daily-js/instance-methods/start-dial-out)
    * [stopDialOut()](/reference/daily-js/instance-methods/stop-dial-out)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Events](/docs/daily-js/concepts/events)
    * [Dial-in/Dial-out Overview](/docs/guides/features/dial-in-dial-out)
    * [daily-js: Dial-in and dial-out](/docs/daily-js/features/dialin-dialout)
  </Card>
</CardGroup>
