Returns VoiceCall object associated with the provided task.
The unique identifier (SID) of the task.
Optional configuration parameters, containing an optional custom voice Device.
A promise that resolves to a VoiceCall object, representing the linked call.
VoiceCall
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { GetCallByTask } from "@twilio/flex-sdk/actions/Voice";async function getCallByTask() { const client = await createClient("SDK_TOKEN"); const getCallByTask = new GetCallByTask("WTXXX"); const voiceCall = await client.execute(getCallByTask); return voiceCall;} Copy
import { createClient } from "@twilio/flex-sdk";import { GetCallByTask } from "@twilio/flex-sdk/actions/Voice";async function getCallByTask() { const client = await createClient("SDK_TOKEN"); const getCallByTask = new GetCallByTask("WTXXX"); const voiceCall = await client.execute(getCallByTask); return voiceCall;}
Optional
Returns VoiceCall object associated with the provided task.
Param: taskSid
The unique identifier (SID) of the task.
Param: options
Optional configuration parameters, containing an optional custom voice Device.
Returns
A promise that resolves to a
VoiceCallobject, representing the linked call.Throws
FlexSdkError with the following error code(s):
Example