setCallOnHold

abstract suspend fun setCallOnHold(callId: CallId, onHold: Boolean)

Instructs the call with the specified callId to go on hold or go back to the active connected state.

If onHold is 'true' and the call is in the CallState.ACTIVE state it will be changed to the CallState.HOLDING state. If onHold is 'false' and the call is in the CallState.HOLDING state it will be changed to the CallState.ACTIVE state. Otherwise this call is ignored.

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

If the callId is unknown or Call.canChangeHoldState is 'false' this call has no effect.

Parameters

callId

ID of one of the calls from the currentCalls property.

onHold

Set to 'true' to put the call on hold, 'false' to take out of hold.