Appearance
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
| Parameter | Type |
|---|---|
state | CallState | 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
| Parameter | Type |
|---|---|
state | CallState |
event | CallEvent |
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
| Parameter | Type |
|---|---|
state | CallState | null |
event | CallEvent |
Returns
CallTransition<CallState | null>