Skip to content

Function: reduceCall() ​

Call Signature ​

ts
function reduceCall(state, event): CallTransition;

A call is created from nothing only by being placed or received; any other event with no call to be about leaves no call.

Parameters ​

ParameterType
stateCallState | null
event| { at: number; expiresAt: number | null; from: string; kind: "invite_received"; media: CallMedia; roomSid: string; sid: string; } | { at: number; kind: "call_created"; media: CallMedia; queue?: string; roomSid: string; sid: string; to: string[]; }

Returns ​

CallTransition

Call Signature ​

ts
function reduceCall(state, event): CallTransition;

A call is created from nothing only by being placed or received; any other event with no call to be about leaves no call.

Parameters ​

ParameterType
stateCallState
eventCallEvent

Returns ​

CallTransition

Call Signature ​

ts
function reduceCall(state, event): CallTransition<CallState | null>;

A call is created from nothing only by being placed or received; any other event with no call to be about leaves no call.

Parameters ​

ParameterType
stateCallState | null
eventCallEvent

Returns ​

CallTransition<CallState | null>

Talkline documentation