session

View as MarkdownOpen in Claude
1get 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

1await client.register();
2
3client.session.incomingCalls$.subscribe((calls) => {
4 const ringing = calls.find((c) => c.status === 'ringing');
5 if (ringing) {
6 ringing.answer({ audio: true, video: true });
7 }
8});

Reattached calls after page reload

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

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.