sipRefer()

Use sipCallTransfer() when moving a call between Daily rooms or when Daily should remain in the call path. Use SIP REFER when the call must be handed off to an external SIP endpoint and Daily should exit the flow entirely. While sipCallTransfer keeps the call anchored to Daily and continues to accrue usage on both active legs, sipRefer removes Daily from the media path once the REFER succeeds.

Note that the participant who initiates this must be an owner or an admin.

Each call to `sipRefer()` API is billed separately. A one-time SIP REFER fee may apply when the REFER request is invoked. Contact support to understand pricing

Example Scenario: Call transfer using SIP REFER

SIP REFER instructs the original SIP caller (e.g., sip:ivr@sip.example.com) to establish a direct connection with the target SIP destination (e.g., sip:support-level3@sip.example.com or sip:support@sip.elsewhere.com). Once the REFER succeeds, Daily is no longer part of the media path.

  • sip:ivr@sip.example.com is in Daily Room A. Ths SIP may have been dialled out to or dialled in.
  • An agent or automation in Room A decides to send the call to sip:support@sip.elsewhere.com.
  • Room A calls sipRefer on the sessionId associated with sip:ivr@sip.example.com and toEndpoint: "sip:support@sip.elsewhere.com".
  • When the REFER is triggered, participant-left and dialin-stopped|dialout-stopped events fire in Room A, and the destination begins ringing as the external systems connect directly. In addition to participant and dial-in and dial-out webhooks, calltransfer webhooks (triggered, initiated, answered, complete) are emitted for Room A.

sipRefer(params)

Parameters

  • sessionId the participant of the sip/pstn participant we want to transfer.
  • toEndPoint destination sip/pstn where call will be transferred.
Compatibility:
Prebuilt
Custom