Type Alias: VoIPContextValue
VoIPContextValue =
object
Defined in: mobile-client/src/voip/VoIPContext.ts:41
Value returned from useVoIP.
Properties​
callStatus​
callStatus:
VoIPCallStatus
Defined in: mobile-client/src/voip/VoIPContext.ts:43
Current call lifecycle status.
clearCallIntent()​
clearCallIntent: () =>
void
Defined in: mobile-client/src/voip/VoIPContext.ts:69
Discards VoIPContextValue.pendingCallIntent once you have acted on it.
Returns​
void
currentCall​
currentCall:
CurrentCall|null
Defined in: mobile-client/src/voip/VoIPContext.ts:47
The call currently being handled, or null when callStatus is available.
endCall()​
endCall: (
reason?) =>Promise<void>
Defined in: mobile-client/src/voip/VoIPContext.ts:91
Ends or rejects the current call. Dismisses CallKit/Telecom and resets state back
to available; leaving the room is up to you. reason (defaults to local) is
surfaced to the system call UI/log and to lastEndedReason.
Parameters​
| Parameter | Type |
|---|---|
reason? | CallEndedReason |
Returns​
Promise<void>
isMuted​
isMuted:
boolean
Defined in: mobile-client/src/voip/VoIPContext.ts:60
Whether the system call UI has the call muted. Reported only, as with VoIPContextValue.isOnHold.
isOnHold​
isOnHold:
boolean
Defined in: mobile-client/src/voip/VoIPContext.ts:58
Whether the native CallKit/Core-Telecom session is currently held. Reported only — apply it to your own tracks.
lastEndedReason​
lastEndedReason:
CallEndedReason|null
Defined in: mobile-client/src/voip/VoIPContext.ts:53
Why the most recently handled call ended. null until a call has ended at
least once. Surfaced so a consumer can react to missed/rejected/etc., e.g.
showing a "missed call" notification.
pendingCallIntent​
pendingCallIntent:
VoIPCallIntent|null
Defined in: mobile-client/src/voip/VoIPContext.ts:67
A redial requested from the iOS Recents list, or null when there is none.
It carries only the handle to call, never a room, so mint a room name yourself.
Held until VoIPContextValue.clearCallIntent, so one arriving before your
app has restored its session is not lost.
reportConnected()​
reportConnected: () =>
Promise<void>
Defined in: mobile-client/src/voip/VoIPContext.ts:83
Report that the room join succeeded and media is flowing. Fulfills CallKit's answer
action (or reports the outgoing call as connected) and moves the call to active.
An answered incoming call must be fulfilled within VoIPFulfillAnswerTimeout
(10s by default) or the native side ends it and onEnded fires.
Returns​
Promise<void>
reportConnectFailed()​
reportConnectFailed: () =>
Promise<void>
Defined in: mobile-client/src/voip/VoIPContext.ts:85
Tell the SDK your room join failed. Ends the call with reason failed.
Returns​
Promise<void>
setCallHeld()​
setCallHeld: (
onHold) =>Promise<void>
Defined in: mobile-client/src/voip/VoIPContext.ts:93
Requests that the native CallKit/Core-Telecom session be held or resumed.
Parameters​
| Parameter | Type |
|---|---|
onHold | boolean |
Returns​
Promise<void>
startCall()​
startCall: (
to,roomName) =>Promise<void>
Defined in: mobile-client/src/voip/VoIPContext.ts:75
Reports an outgoing call to to in roomName to CallKit/Core-Telecom and moves
to connecting. Run your own signaling (ringing the callee) before calling this.
It does not join the room — react to callStatus becoming connecting for that.
Parameters​
| Parameter | Type |
|---|---|
to | string |
roomName | string |
Returns​
Promise<void>
voipToken​
voipToken:
string|null
Defined in: mobile-client/src/voip/VoIPContext.ts:45
This device's VoIP push token, or null until APNs has issued one.