@dialstack/sdk / react / UseCallsResult
Interface: UseCallsResult
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:124
Properties
activeCall
activeCall: Call | null;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:134
The single call the user is talking to (rendered by the UI), or null.
answerCall
answerCall: (call) => void;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:152
Answer a specific ringing inbound call. Holds the current active call (if any) and makes the answered call active.
Parameters
call
Call
Returns
void
calls
calls: CallEntry[];
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:132
Every live call leg — the active call, any held calls, and any ringing
inbound calls (call-waiting). activeCall/consultCall/heldCalls/
incomingCalls below are conveniences derived from this.
cancelAttendedTransfer
cancelAttendedTransfer: () => void;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:200
Abandon an in-progress attended transfer: hang up the consult leg and resume the held original. No-op unless a consult is in progress.
Returns
void
clearEmergencyAddressRegisteredIp
clearEmergencyAddressRegisteredIp: (id) => Promise<void>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:221
Clear an address's network binding (registered_ip) so a reconnect re-binds.
Parameters
id
string
Returns
Promise<void>
completeAttendedTransfer
completeAttendedTransfer: () => void;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:194
Attended transfer, step 2: bridge the held original to the consult party. Both legs end with reason 'transferred'. No-op unless a consult is answered.
Returns
void
connection
connection: SoftphoneConnectionState;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:126
Connection lifecycle state.
consultCall
consultCall: Call | null;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:167
The consult leg of an in-progress attended transfer, or null. While set, the
activeCall is the live consult leg (the party the user is now talking to)
and transferOriginal is the original, held party. Cleared on
complete/cancel or when either leg ends.
getPresentedEmergencyAddressId
getPresentedEmergencyAddressId: () => string | null;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:218
The emergency-address id the phone presents on authenticate (null if none). Distinguishes "this session bound the address" from "a saved address has a registered_ip from a past session" — the E911 gate is only satisfied for the former.
Returns
string | null
heldCalls
heldCalls: Call[];
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:173
All currently-held (backgrounded) answered calls — the calls the user can
switch back to. Excludes ringing inbound calls (see incomingCalls).
incomingCalls
incomingCalls: Call[];
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:141
Ringing inbound calls not yet answered — a call-waiting interrupt during an active call, or (while idle) one or more concurrent inbound calls. The UI shows these as answer/decline cards; answering one holds the active call and makes the answered call active.
listEmergencyAddresses
listEmergencyAddresses: () => Promise<EmergencyAddress[]>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:207
List the user's saved emergency addresses. Truth for "is this session's
emergency address bound to the current network" is registered_ip !== null
on the presented address (server binds it at the authenticate handshake).
Returns
Promise<EmergencyAddress[]>
placeCall
placeCall: (destination) => Promise<void>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:159
Place an outbound call to destination. When a call is already active it is
held and the new outbound becomes active. No-ops unless connected and the
destination is non-empty (up to the concurrent-call cap). Errors surface via
onError.
Parameters
destination
string
Returns
Promise<void>
reconnect
reconnect: () => Promise<void>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:228
Tear down and reconnect, re-running authenticate so the current emergency address binds to this network. How a just-selected/created address takes effect, and how a moved session re-binds.
Returns
Promise<void>
reconnectWithEmergency
reconnectWithEmergency: (id) => Promise<void>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:234
Select id and reconnect in one step, so the fresh authenticate presents it
and the server binds it to this network. Resolves once the binding confirms.
Parameters
id
string
Returns
Promise<void>
setEmergencyAddress
setEmergencyAddress: (input) => Promise<EmergencyAddress>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:210
Create + validate a new emergency address (does not bind until reconnect).
Parameters
input
EmergencyAddressInput
Returns
Promise<EmergencyAddress>
startAttendedTransfer
startAttendedTransfer: (destination) => Promise<void>;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:188
Attended transfer, step 1: hold activeCall and dial destination as a
consult leg (stored in consultCall). No-ops unless there's an active call
and no consult already in progress. Errors surface via onError.
Parameters
destination
string
Returns
Promise<void>
switchToCall
switchToCall: (call) => void;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:147
Switch the active call to call (must be an already-answered held call):
holds the current active call and resumes call. No-op if it's already
active or not a held call.
Parameters
call
Call
Returns
void
transferOriginal
transferOriginal: Call | null;
Defined in: sdk/src/react/softphone/hooks/useCalls.ts:181
The specific held original being transferred to consultCall, or null. This
is the consult's linked partner (transferPeer), NOT merely "a held call" —
so it stays correct if other held calls exist. The consulting UI shows this
as the on-hold party opposite the live consult.