sipCallTransfer()

Transfer a SIP dial-in call from one Daily room to another Daily room. Alternatively, transfer an initiated SIP/PSTN Dialout to another SIP URI or PSTN number. Note that the participant who initiates this must be an owner or an admin.

Example Scenarios

SIP Dialin call transfer

Transferring within Daily

  • user with sip address (sip:someone@sip.abc.com, originating SIP device) dials in to the sip_uri endpoint of Daily room-x.
  • sipCallTransfer() API is called with toEndPoint pointing to the sip_uri endpoint of Daily room-y.
  • Originating SIP device disconnects from room-x and joins room-y.
  • a participant-joined for the originating SIP device is received on room-y, while a dialin-stopped is recieved on room-x.

Transferring outside Daily

  • use sipRefer or instead initiate a second dialout to sip:someother@sip.abc.com

Transferring to PSTN

  • user with sip address (sip:someone@sip.abc.com, originating SIP device) dials in to the sip_uri endpoint of Daily room-x.
  • sipCallTransfer() API is called with toEndPoint pointing to the phone number +187659325xx
  • Originating SIP device disconnects from room-x and +187659325xx starts ringing.
  • callerId (optional): The caller ID to use for the PSTN. This should be the ID of a number purchased on Daily. If callerId is not provided, the phone number of the incoming call is used as the caller ID (if the SIP dial-in was started from a phone, e.g., pinless dial-in). Otherwise, by default, the most recently purchased phone number is used as the caller ID.

SIP Dialout call transfer

Transfering within Daily

  • room-x dials out to a SIP device sip:someone@sip.abc.com.
  • sipCallTransfer() API is called with sip_uri endpoint of Daily room-y.
  • Originating SIP device disconnects from room-x and joins room-y.
  • a participant-joined for the originating SIP device is received on room-y, while a dialout-stopped is recieved on room-x.
  • callerId (optional): When callerId are not passed, the number of the dialled end-user is used. To use the Daily phone number, see the id associated with the purchased phone number.

Transferring outside Daily

  • use sipRefer or instead initiate a second dialout to sip:someother@sip.abc.com

PSTN call transfer

  • room-x dials out to phone number +123456789xx
  • sipCallTransfer() API is called with phone number +187659325xx
  • phone +12345678900 disconnects from room-x, +187659325xx starts ringing with caller as +123456789xx

Alternatively,

  • phone +123456789xx dials in to room-x
  • sipCallTransfer() API is called with toEndPoint phone number +187659325xx
  • phone +123456789xx disconnects from room-x, +187659325xx starts ringing with caller as +123456789xx

sipCallTransfer(params)

Parameters

  • sessionId: the sessionId of the sip/pstn participant that we want to transfer.
  • toEndPoint: the destination SIP address (e.g., sip:someone@sip.abc.com) or PSTN number (e.g., +165865745xx) to where the call is transferred.
  • callerId (optional): only allowed when transferring to a PSTN number
Compatibility:
Prebuilt
Custom