session

View as MarkdownOpen in Claude
get session(): ClientSessionWrapper

The active client session. Exposes the SessionState surface — including the lists of active and inbound calls — once the client is connected and authenticated.

This is the entry point for inbound calls: subscribe to session.incomingCalls$ after calling register() to receive notification of ringing calls.

Examples

Inbound calls

await client.register();
client.session.incomingCalls$.subscribe((calls) => {
const ringing = calls.find((c) => c.status === 'ringing');
if (ringing) {
ringing.answer({ audio: true, video: true });
}
});

Reattached calls after page reload

const existing = client.session.calls;
if (existing.length > 0) {
const call = existing[0];
// re-bind call.status$, call.remoteStream$, etc. to your UI
}

See

  • SessionState — full interface, including calls$, incomingCalls$, authenticated$.
  • register — must be called before inbound calls route to this session.
  • Inbound Calls guide — end-to-end accept/reject flow.