Skip to main content

@dialstack/sdk-dev / react/src/softphone / UseCallActions

Interface: UseCallActions

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:41

Extends​

  • CallActions

Properties​

answer​

TypeScript
answer: () => void;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:32

Returns​

void

Inherited from​

CallActions.answer


callActionsFor​

TypeScript
callActionsFor: (call) => CallActions;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:58

Build the per-call action subset for a SPECIFIC call — used by the incoming/held cards, which act on a call that isn't the foreground one. The foreground actions above are exactly callActionsFor(activeCall).

Parameters​

call​

Call | null

Returns​

CallActions


hangup​

TypeScript
hangup: () => void;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:34

Returns​

void

Inherited from​

CallActions.hangup


reject​

TypeScript
reject: () => void;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:33

Returns​

void

Inherited from​

CallActions.reject


sendDtmf​

TypeScript
sendDtmf: (digit) => void;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:38

Send a DTMF digit (no-op when no call).

Parameters​

digit​

string

Returns​

void

Inherited from​

CallActions.sendDtmf


toggleHold​

TypeScript
toggleHold: () => void;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:36

Returns​

void

Inherited from​

CallActions.toggleHold


toggleMute​

TypeScript
toggleMute: () => void;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:35

Returns​

void

Inherited from​

CallActions.toggleMute


transfer​

TypeScript
transfer: (destination) => boolean;

Defined in: sdk/react/src/react/softphone/hooks/useCallActions.ts:51

Blind-transfer the active call to destination. Returns true when the transfer was initiated (so the UI can close its transfer overlay), false on empty input or a synchronous failure routed to onError. true means initiated, not confirmed: once the far end accepts, the call ends ('transferred') as on a deskphone, so a target that is then busy or doesn't answer is not reported. A refusal arrives as a transfer_failed onError and leaves the call up.

Parameters​

destination​

string

Returns​

boolean