register

View as MarkdownOpen in Claude
1register(): Promise<void>

Registers the user as online to receive inbound calls and events.

Waits for authentication to complete before sending the registration. If the initial attempt fails, reauthentication is attempted automatically.

After register() resolves, inbound calls addressed to this user surface through session.incomingCalls$. Call unregister to stop receiving calls without disconnecting the client.

Returns

Promise<void>

Throws

If registration and reauthentication both fail.

Examples

Register and watch for 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});

Track registration state reactively

1client.isRegistered$.subscribe((registered) => {
2 console.log('registered:', registered);
3});

See