@dialstack/sdk-dev / native/src / OsCallAdapter
Interface: OsCallAdapter
Defined in: sdk/native/src/os/OsCallAdapter.ts:68
Methods
answer()
answer(sessionId): Promise<void>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:91
The app's own Answer/End buttons go through the OS too, so every answer —
lock screen, notification, car, watch, in-app — arrives as the same
answer/end event and there is one code path, not two.
Parameters
sessionId
string
Returns
Promise<void>
end()
end(sessionId): Promise<void>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:92
Parameters
sessionId
string
Returns
Promise<void>
getActiveSession()
getActiveSession(): Promise<OsActiveSession | null>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:85
The session the OS currently treats as active, if any.
Returns
Promise<OsActiveSession | null>
on()
on<K>(event, listener): () => void;
Defined in: sdk/native/src/os/OsCallAdapter.ts:93
Type Parameters
K
K extends keyof OsCallEvents
Parameters
event
K
listener
OsCallEvents[K]
Returns
() => void
reportConnected()
reportConnected(sessionId): Promise<void>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:78
The call the OS is showing as incoming/dialling is now connected.
Parameters
sessionId
string
Returns
Promise<void>
reportEnded()
reportEnded(sessionId, reason): Promise<void>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:80
Must not re-emit end — the bridge is telling the OS, not the other way round.
Parameters
sessionId
string
reason
Returns
Promise<void>
reportIncoming()
reportIncoming(call): Promise<string>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:70
Resolves to the OS-assigned session id (the OS assigns, never the caller).
Parameters
call
Returns
Promise<string>
reportOutgoing()
reportOutgoing(call): Promise<string>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:76
Report an outbound call so the OS holds a live session — on Android that starts the foreground service keeping the process and call alive when backgrounded, which an outbound call otherwise lacks.
Parameters
call
Returns
Promise<string>
setHeld()
setHeld(sessionId, held): Promise<void>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:82
Remote-initiated state only; the OS already knows about its own actions.
Parameters
sessionId
string
held
boolean
Returns
Promise<void>
setMuted()
setMuted(sessionId, muted): Promise<void>;
Defined in: sdk/native/src/os/OsCallAdapter.ts:83
Parameters
sessionId
string
muted
boolean
Returns
Promise<void>