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_uriendpoint of Dailyroom-x. sipCallTransfer()API is called withtoEndPointpointing to thesip_uriendpoint of Dailyroom-y.- Originating SIP device disconnects from
room-xand joinsroom-y. - a
participant-joinedfor the originating SIP device is received onroom-y, while adialin-stoppedis recieved onroom-x.
Transferring outside Daily
- use
sipReferor 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_uriendpoint of Dailyroom-x. sipCallTransfer()API is called withtoEndPointpointing to the phone number+187659325xx- Originating SIP device disconnects from
room-xand+187659325xxstarts 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-xdials out to a SIP devicesip:someone@sip.abc.com.sipCallTransfer()API is called withsip_uriendpoint of Dailyroom-y.- Originating SIP device disconnects from
room-xand joinsroom-y. - a
participant-joinedfor the originating SIP device is received onroom-y, while adialout-stoppedis recieved onroom-x. - callerId (optional): When
callerIdare not passed, the number of the dialled end-user is used. To use the Daily phone number, see theidassociated with the purchased phone number.
Transferring outside Daily
- use
sipReferor instead initiate a second dialout tosip:someother@sip.abc.com
PSTN call transfer
room-xdials out to phone number+123456789xxsipCallTransfer()API is called with phone number+187659325xx- phone
+12345678900disconnects fromroom-x,+187659325xxstarts ringing with caller as+123456789xx
Alternatively,
- phone
+123456789xxdials in toroom-x sipCallTransfer()API is called withtoEndPointphone number+187659325xx- phone
+123456789xxdisconnects fromroom-x,+187659325xxstarts 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 numberextension(optional): string representing the extension to dial after dialed number is connected. Only valid withphoneNumberMax length 20waitBeforeExtensionDialSec(optional): number of seconds to wait to dial the extension, once dialed number is connected.
Compatibility:
Prebuilt
Custom