> ## 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 and PSTN call transfers

> Transfer SIP and PSTN calls between Daily rooms or to external destinations using SIP Call Transfer or SIP REFER.

Daily provides two methods for transferring SIP and PSTN calls:

* **PSTN and SIP Call Transfer** — redirects the far end of the call to a new SIP or PSTN destination while keeping the original SIP connection anchored to Daily.
* **SIP REFER** — hands the call off to the originating SIP system, removing Daily from the call entirely.

<Warning>
  **SIP Call Transfer**: Both the original and new connections stay active after the transfer. Usage is billed on both legs for the duration of the transferred call.
</Warning>

<Warning>
  **SIP REFER**: Daily exits the media path when the REFER succeeds. A one-time SIP REFER fee may apply. Contact [support](mailto:help@daily.co) for pricing.
</Warning>

## SIP Call Transfer

Use `sipCallTransfer` when you want to redirect a caller to another Daily room or external destination while Daily remains in the media path. This preserves session continuity, analytics, and room state.

Works for both dial-in and dial-out connections.

### Transfer scenarios

**1. Room-to-room transfer**

Alice is in Room A (via dial-in or dial-out). Transfer her to Room B:

```javascript theme={null}
await call.sipCallTransfer({
  sessionId: 'alice-session-id',
  toEndPoint: 'sip:room-b@domain.sip.daily.co',
});
```

Alice leaves Room A (`participant-left`, `dialin-stopped` / `dialout-stopped` fire) and joins Room B. Transfer webhooks (`triggered`, `initiated`, `answered`, `complete`) fire in Room A.

**2. External SIP transfer**

Transfer Alice to an external SIP endpoint:

```javascript theme={null}
await call.sipCallTransfer({
  sessionId: 'alice-session-id',
  toEndPoint: 'sip:callme@sip.somewhere.com',
});
```

Alice leaves Room A, but the call continues to route through Daily to the external destination.

**3. PSTN transfer**

Transfer Alice's phone call to another phone number:

```javascript theme={null}
await call.sipCallTransfer({
  sessionId: 'pstn-session-id',
  toEndPoint: '+123456xxx',
  callerID: '99ae8ddd-d32c-4786-9bb4-62235a4e7d55', // optional: ID of purchased number to use as caller ID
});
```

SIP-to-PSTN and PSTN-to-SIP cross-type transfers are supported. Billing depends on the connection types (e.g., two PSTN connections = two PSTN minutes per minute).

If no `callerID` is provided, Daily uses a phone number from your account. To present the original caller's number (number masquerading), contact [support](mailto:help@daily.co) — this feature requires account enablement.

## SIP REFER

Use `sipRefer` to fully hand off a call to an external SIP system, removing Daily from the call flow:

```javascript theme={null}
await call.sipRefer({
  sessionId: 'sip-session-id',
  toEndPoint: 'sip:external-ivr@sip.example.com',
});
```

When the REFER succeeds, the original SIP caller connects directly to the target. `participant-left` and `dialin-stopped` / `dialout-stopped` events fire in the Daily room, and transfer webhooks are emitted.

Common use cases:

* Returning a call to an IVR, PBX, or call-center platform
* Handing off between SIP providers without Daily staying in the loop

<Note>
  If the originating SIP system doesn't support SIP REFER, use `sipCallTransfer` instead. The call remains anchored to Daily and usage accrues during the transfer.
</Note>

## Choosing the right method

| Scenario                                                       | Method            |
| -------------------------------------------------------------- | ----------------- |
| Transfer caller between Daily rooms                            | `sipCallTransfer` |
| Transfer to external SIP/PSTN destination, Daily stays in path | `sipCallTransfer` |
| Hand call fully back to originating SIP system                 | `sipRefer`        |
| Add a new SIP/PSTN participant to the current room             | `startDialOut()`  |

## Implementation

**REST API:**

* [`/rooms/:name/callTransfer/sipCallTransfer`](/reference/rest-api/rooms/call-transfer/sip-call-transfer)
* [`/rooms/:name/callTransfer/sipRefer`](/reference/rest-api/rooms/call-transfer/sip-refer)

**Client SDK:**

* [`sipCallTransfer()`](/reference/daily-js/instance-methods/sip-call-transfer) — daily-js
* [`sipRefer()`](/reference/daily-js/instance-methods/sip-refer) — daily-js
