connect
connect
- connect(
params):Promise<Call>
Attempt to connect an existing call to a new outbound call. The two devices will hear each other. You can wait until the new peer is disconnected by calling disconnected.
This is a generic method that allows you to connect to multiple devices in series, parallel, or combinations of both with the use of a DeviceBuilder.
For simpler use cases, we recommend using connectPhone or connectSip.
Parameters
Object containing the parameters for connecting the call.
A device builder specifying the devices to call. See VoiceDeviceBuilder.
Ringback audio to play to the first call leg. You can play audio, TTS, silence or ringtone. See VoicePlaylist.
The maximum price in USD acceptable for the call to be created. If the rate for the call is greater than this value, the call will not be created. If not set, all calls will be created. Price can have a maximum of four decimal places, i.e. 0.0075.
Returns
Promise<Call>
A promise that resolves to a Call object that you can use to control the new peer.
The promise resolves only after the new peer picks up the call.
Examples
Connecting to a new SIP call, while playing ringback audio to the first leg of the call.