Puts a voice task participant on hold.
The unique identifier (SID) of the participant to be held. Can be either a worker SID or participant SID.
The unique identifier (SID) of the task to hold the participant in.
Optional configuration parameters for customizing the participant holding process.
A promise that resolves when the participant is successfully held.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { HoldVoiceParticipant } from "@twilio/flex-sdk/actions/Voice";async function holdVoiceParticipant() { const client = await createClient("SDK_TOKEN"); const holdVoiceParticipantAction = new HoldVoiceParticipant( "WKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ); await client.execute(holdVoiceParticipantAction);} Copy
import { createClient } from "@twilio/flex-sdk";import { HoldVoiceParticipant } from "@twilio/flex-sdk/actions/Voice";async function holdVoiceParticipant() { const client = await createClient("SDK_TOKEN"); const holdVoiceParticipantAction = new HoldVoiceParticipant( "WKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ); await client.execute(holdVoiceParticipantAction);}
Optional
Puts a voice task participant on hold.
Param: targetParticipantSid
The unique identifier (SID) of the participant to be held. Can be either a worker SID or participant SID.
Param: taskSid
The unique identifier (SID) of the task to hold the participant in.
Param: options
Optional configuration parameters for customizing the participant holding process.
Returns
A promise that resolves when the participant is successfully held.
Throws
FlexSdkError with the following error code(s):
Example