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 thesip_uri
endpoint of Dailyroom-x
. sipCallTransfer()
API is called withtoEndPoint
pointing to thesip_uri
endpoint of Dailyroom-y
.- Originating SIP device disconnects from
room-x
and joinsroom-y
. - a
participant-joined
for the originating SIP device is received onroom-y
, while adialin-stopped
is recieved onroom-x
.
Transferring outside Daily
- use
sipRefer
or instead initiate a second dialout tosip:someother@sip.abc.com
Transferring to PSTN
- user with sip address (
sip:someone@sip.abc.com
, originating SIP device) dials in to thesip_uri
endpoint of Dailyroom-x
. sipCallTransfer()
API is called withtoEndPoint
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 devicesip:someone@sip.abc.com
.sipCallTransfer()
API is called withsip_uri
endpoint of Dailyroom-y
.- Originating SIP device disconnects from
room-x
and joinsroom-y
. - a
participant-joined
for the originating SIP device is received onroom-y
, while adialout-stopped
is recieved onroom-x
. - callerId (optional): When
callerId
are not passed, the number of the dialled end-user is used. To use the Daily phone number, see theid
associated with the purchased phone number.
Transferring outside Daily
- use
sipRefer
or instead initiate a second dialout tosip: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 fromroom-x
,+187659325xx
starts ringing with caller as+123456789xx
Alternatively,
- phone
+123456789xx
dials in toroom-x
sipCallTransfer()
API is called withtoEndPoint
phone number+187659325xx
- phone
+123456789xx
disconnects fromroom-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