Skip to main content

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

Interface: SoftphoneContextValue

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProvider.tsx:170

The web softphone context: the shared base plus the web-only scope (the CSS class the .ds-* styles are nested under). Native adds locationProvider instead; components read only the fields their platform provides.

Extends​

  • SoftphoneContextBase

Properties​

actions​

TypeScript
actions: UseCallActions;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:70

Inherited from​

SoftphoneContextBase.actions


activeCall​

TypeScript
activeCall: Call | null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:63

Inherited from​

SoftphoneContextBase.activeCall


answerCall​

TypeScript
answerCall: (call) => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:68

Parameters​

call​

Call

Returns​

void

Inherited from​

SoftphoneContextBase.answerCall


calls​

TypeScript
calls: Call[];

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:62

Inherited from​

SoftphoneContextBase.calls


cancelAttendedTransfer​

TypeScript
cancelAttendedTransfer: () => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:92

Returns​

void

Inherited from​

SoftphoneContextBase.cancelAttendedTransfer


canMerge​

TypeScript
canMerge: boolean;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:100

Whether merging is possible: two connected calls, no transfer, WebAudio present.

Inherited from​

SoftphoneContextBase.canMerge


clearError​

TypeScript
clearError: () => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:110

Returns​

void

Inherited from​

SoftphoneContextBase.clearError


completeAttendedTransfer​

TypeScript
completeAttendedTransfer: () => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:91

Returns​

void

Inherited from​

SoftphoneContextBase.completeAttendedTransfer


conferenceAudio​

TypeScript
conferenceAudio: MediaStream | null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:98

While merged, every remote party mixed — what the local user hears.

Inherited from​

SoftphoneContextBase.conferenceAudio


connection​

TypeScript
connection: SoftphoneConnectionState;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:55

Inherited from​

SoftphoneContextBase.connection


consultCall​

TypeScript
consultCall: Call | null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:88

Inherited from​

SoftphoneContextBase.consultCall


directory​

TypeScript
directory: readonly DirectoryContact[];

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:128

What the transfer / add-call picker lists: the users from accountDirectory when on, then the host's directory. Empty when neither has entries.

Inherited from​

SoftphoneContextBase.directory


displayNumber​

TypeScript
displayNumber: (value) => string;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:112

Parameters​

value​

string

Returns​

string

Inherited from​

SoftphoneContextBase.displayNumber


duration​

TypeScript
duration: string;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:87

Live m:ss duration of the active call.

Deprecated​

Use useCallDuration(activeCall). This field changes on every clock tick, so it re-renders every useSoftphone() consumer twice a second during a call, even ones that never read it. It will be removed in the next major release.

Inherited from​

SoftphoneContextBase.duration


emergency​

TypeScript
emergency: UseEmergencyBinding;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:107

Inherited from​

SoftphoneContextBase.emergency


emergencyManagedByHost​

TypeScript
emergencyManagedByHost: boolean;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:108

Inherited from​

SoftphoneContextBase.emergencyManagedByHost


hangupConference​

TypeScript
hangupConference: () => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:104

Hang up every leg of the conference (the merged UI shows one Hang up).

Returns​

void

Inherited from​

SoftphoneContextBase.hangupConference


heldCalls​

TypeScript
heldCalls: Call[];

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:67

Inherited from​

SoftphoneContextBase.heldCalls


holdConference​

TypeScript
holdConference: (held) => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:106

Hold or resume every leg of the conference together.

Parameters​

held​

boolean

Returns​

void

Inherited from​

SoftphoneContextBase.holdConference


incomingCalls​

TypeScript
incomingCalls: Call[];

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:64

Inherited from​

SoftphoneContextBase.incomingCalls


incomingRinging​

TypeScript
incomingRinging: boolean;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:66

True while an unanswered inbound call should be audibly ringing.

Inherited from​

SoftphoneContextBase.incomingRinging


isMerged​

TypeScript
isMerged: boolean;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:96

Inherited from​

SoftphoneContextBase.isMerged


lastError​

TypeScript
lastError:
| {
code: string;
message: string;
}
| null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:109

Inherited from​

SoftphoneContextBase.lastError


layoutVariant​

TypeScript
layoutVariant: SoftphoneLayoutVariant;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:122

The size tier the host asked for ('auto' unless pinned).

Inherited from​

SoftphoneContextBase.layoutVariant


mergeCalls​

TypeScript
mergeCalls: () => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:101

Returns​

void

Inherited from​

SoftphoneContextBase.mergeCalls


mergedCalls​

TypeScript
mergedCalls: Call[];

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:95

The calls bridged into a local three-way conference (empty when not merged).

Inherited from​

SoftphoneContextBase.mergedCalls


overlays​

TypeScript
overlays: UseCallOverlays;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:78

Internal built-in-UI machinery: the mutually-exclusive keypad/transfer overlay flags the bundled OngoingCall renders. Not part of the public softphone API — a custom layout owns its own presentation state and ignores this. Kept on the shared context (rather than local to OngoingCall) only so web and React Native can't drift on when the overlays reset.

Inherited from​

SoftphoneContextBase.overlays


palette​

TypeScript
palette: CallPalette;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:114

Resolved theme palette — computed on both platforms so mobile themes like web.

Inherited from​

SoftphoneContextBase.palette


peerInfo​

TypeScript
peerInfo: (call) => PeerInfo | null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:120

The host's PeerInfo for a call, from resolvePeer, or null while it resolves, when the host has none, or when no resolver is set. The built-in views read it; a custom UI can too.

Parameters​

call​

Call | null | undefined

Returns​

PeerInfo | null

Inherited from​

SoftphoneContextBase.peerInfo


peerName​

TypeScript
peerName: (number) => string | null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:133

The name for a call's number, or null: the host's directory first, then the account's users when they are listed, matched in defaultCountry.

Parameters​

number​

string

Returns​

string | null

Inherited from​

SoftphoneContextBase.peerName


placeCall​

TypeScript
placeCall: (destination) => Promise<void>;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:93

Parameters​

destination​

string

Returns​

Promise<void>

Inherited from​

SoftphoneContextBase.placeCall


scope​

TypeScript
scope: string;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProvider.tsx:172

The scoped class name that wraps the softphone UI (for .ds-* styles).


splitMerge​

TypeScript
splitMerge: () => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:102

Returns​

void

Inherited from​

SoftphoneContextBase.splitMerge


startAttendedTransfer​

TypeScript
startAttendedTransfer: (destination) => Promise<void>;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:90

Parameters​

destination​

string

Returns​

Promise<void>

Inherited from​

SoftphoneContextBase.startAttendedTransfer


switchToCall​

TypeScript
switchToCall: (call) => void;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:69

Parameters​

call​

Call

Returns​

void

Inherited from​

SoftphoneContextBase.switchToCall


t​

TypeScript
t: (key) => string;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:111

Parameters​

key​

| "title" | "hangUp" | "transfer" | "cancel" | "call" | "done" | "answer" | "split" | "callWaiting" | "connecting" | "disconnected" | "decline" | "reconnecting" | "mute" | "unmute" | "destinationPlaceholder" | "backspace" | "connectionError" | "callError" | "transferFailedError" | "micPermissionError" | "dismiss" | "unknownCaller" | "incomingCall" | "hold" | "resume" | "keypad" | "transferPlaceholder" | "transferSend" | "transferNow" | "transferConsult" | "transferComplete" | "transferConsulting" | "transferOriginalOnHold" | "addCall" | "addCallPlaceholder" | "addCallSend" | "directoryLabel" | "directorySearchPlaceholder" | "directoryNoMatches" | "presenceAvailable" | "presenceOnCall" | "presenceDoNotDisturb" | "presenceAway" | "presenceOffline" | "enterNumber" | "chooseFromDirectory" | "directoryMatches" | "directoryClearPick" | "directoryClearSearch" | "dialTarget" | "transferToLabel" | "addCallToLabel" | "merge" | "conferenceLabel" | "stateTrying" | "stateRinging" | "stateActive" | "stateHeld" | "stateEnded" | "audioDevices" | "audioMicrophone" | "audioSpeaker" | "audioSystemDefault" | "audioUnnamedDevice" | "audioLabelsHidden" | "audioDevicesUnsupported" | "audioSpeakerUnsupported" | "audioMicrophoneLost" | "switchToCall" | "heldCallsLabel" | "emergencyPrompt" | "emergencyHint" | "emergencyConfirm" | "emergencyNewLocation" | "emergencyUseLocation" | "emergencyLocating" | "emergencyNumber" | "emergencyStreet" | "emergencyUnit" | "emergencyCity" | "emergencyState" | "emergencyPostalCode" | "emergencySave" | "emergencySaving" | "emergencyBack"

Returns​

string

Inherited from​

SoftphoneContextBase.t


transferOriginal​

TypeScript
transferOriginal: Call | null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:89

Inherited from​

SoftphoneContextBase.transferOriginal


webrtcPhone​

TypeScript
webrtcPhone:
| DialStackPhone
| null;

Defined in: sdk/react/src/react/softphone/provider/SoftphoneProviderBase.tsx:61

The live WebRTC phone, or null before the first one is constructed. For the phone-scoped settings that aren't per-call — audio device selection, which must work whether or not a call is up. Per-call actions belong on actions.

Inherited from​

SoftphoneContextBase.webrtcPhone