INNER CODE UNIT · JavaScript
makeInternalCall
twilio-labs/function-templates · experimental-flex-dialpad/ui-src/src/components/InternalCall/index.js:10
export const makeInternalCall = ({ manager, selectedWorker, workerList }) => {
const { workflow_sid, queue_sid } =
manager.serviceConfiguration.outbound_call_flows.default;
const { REACT_APP_TASK_CHANNEL_SID: taskChannelSid } = process.env;
const {
attributes: { contact_uri, full_name: fromFullName },
name: fromName,
} = manager.workerClient;
const {
attributes: { full_name },
friendly_name,
} = workerList.find(
(worker) => worker.attributes.contact_uri === selectedWorker
);