Ends a call for all participants.
The unique identifier (SID) of the task to be ended.
A promise that resolves to a Task object, representing the ended task.
Task
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { EndVoiceCallForAll } from "@twilio/flex-sdk/actions/Voice";async function endVoiceCallForAll() { const client = await createClient("SDK_TOKEN"); const endVoiceCallForAll = new EndVoiceCallForAll("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); const endedTask = await client.execute(endVoiceCallForAll); return endedTask;} Copy
import { createClient } from "@twilio/flex-sdk";import { EndVoiceCallForAll } from "@twilio/flex-sdk/actions/Voice";async function endVoiceCallForAll() { const client = await createClient("SDK_TOKEN"); const endVoiceCallForAll = new EndVoiceCallForAll("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); const endedTask = await client.execute(endVoiceCallForAll); return endedTask;}
Ends a call for all participants.
Param: taskSid
The unique identifier (SID) of the task to be ended.
Returns
A promise that resolves to a
Taskobject, representing the ended task.Throws
FlexSdkError with the following error code(s):
Example