holdCall

abstract suspend fun holdCall(callId: CallId)

Puts the active call with the specified callId on hold when another incoming call arrives allowing the end-user to take the other call. If there is a second call which is already on hold, this call will be made active, effectively swapping the calls.

If the call is in the CallState.ACTIVE state it will be changed to the CallState.HOLDING state. If the call is not in the CallState.ACTIVE this method has no effect.

Any state change will be reflected through updates to the currentCalls property.

If no call exists with the specified callId this method has no effect.

Whether a call can be put on hold is reflected in Call.capabilities by CallCapability.HOLD.

If there is already a second call which is in the CallState.HOLDING, this call will be set to CallState.ACTIVE.

Parameters

callId

ID of one of the calls from the currentCalls property.