Skip to content
Chatto v0.5.0

VoiceCallService

Chatto exposes this service below /api/connect.

Shared message and enum definitions are documented in Shared Types And Enums.

Room-scoped voice and video calls.

Lists member rooms that currently have active calls as a finite runtime snapshot. Rooms the caller is not a member of are omitted.

Returns an empty list when LiveKit is not configured.

POST /api/connect/chatto.api.v1.VoiceCallService/ListActiveCalls

Request for active room call snapshots.

Finite runtime snapshot of active room calls.

FieldTypeDescription
callsrepeated ActiveCallActive calls in room order returned by the call-state projection.

Gets the current active call snapshot for one room.

The caller must be a member of the room. Returns NOT_FOUND when the room does not exist, currently has no active call, or voice calls are not configured. The returned call_id lets clients ignore stale realtime call events from previous calls in the same room.

POST /api/connect/chatto.api.v1.VoiceCallService/GetActiveCall

Request for one room’s active call snapshot.

FieldTypeDescription
room_idstringRequired. Room whose active call should be inspected.

Response for one room’s active call snapshot.

FieldTypeDescription
callActiveCallCurrent active call.

Gets current active call snapshots for many rooms.

Rooms that do not exist, are inaccessible, or currently have no active call are omitted. Results preserve first-seen request order and repeated room IDs are de-duplicated. Returns an empty list when LiveKit is not configured.

POST /api/connect/chatto.api.v1.VoiceCallService/BatchGetActiveCalls

Request active call snapshots for many rooms.

FieldTypeDescription
room_idsrepeated stringRequired room IDs. Unknown, inaccessible, and inactive rooms are omitted.

Active call batch response.

FieldTypeDescription
callsrepeated ActiveCallActive calls in first-seen request order.

Lists participants currently observed in a room’s active call as a finite runtime snapshot.

The caller must be a member of the room. Returns NOT_FOUND when the room does not exist and PERMISSION_DENIED when the caller is not a room member.

POST /api/connect/chatto.api.v1.VoiceCallService/ListCallParticipants

Request for participants in a room call.

FieldTypeDescription
room_idstringRequired. Room whose active call should be inspected.

Finite runtime snapshot of participants in one room call.

FieldTypeDescription
participantsrepeated CallParticipantParticipants currently projected for the room call.

Records the caller’s intent to join a room call.

Requires room membership and call.join. If no call is active, also requires call.start. Publishing permissions do not grant admission.

Returns joined=false when LiveKit is not configured.

POST /api/connect/chatto.api.v1.VoiceCallService/JoinCall

Request to record joining a room call.

FieldTypeDescription
room_idstringRequired. Room whose call is being joined.

Response from recording a join intent.

FieldTypeDescription
joinedboolTrue when a join fact was recorded.

Issues a LiveKit token for joining the room’s active call.

Requires room membership and call.join. A call must already be active. The token permits microphone, camera, and screen-share sources only when call.voice, call.camera, and call.screenshare respectively allow them. A caller without publishing permissions can listen and watch. Tokens expire after five minutes. Expiry does not end an established call. Chatto checks connected participant permissions on its 30-second LiveKit reconciliation cycle. Failed checks retry on subsequent cycles. Returns NOT_FOUND when the room does not exist, PERMISSION_DENIED when the caller is not a room member, and FAILED_PRECONDITION when no call is active or voice and video calls are not configured.

POST /api/connect/chatto.api.v1.VoiceCallService/CreateCallToken

Request for a LiveKit token for a room call.

FieldTypeDescription
room_idstringRequired. Room whose active call should be joined.

LiveKit token details for joining a room call.

FieldTypeDescription
tokenstringLiveKit JWT token.
e2ee_keystringShared E2EE key for this active call.
call_idstringActive call session ID.

Issues a short-lived LiveKit token for a native companion publisher owned by the caller. Companion publishers contribute media to the caller’s logical participant without becoming call participants themselves.

Requires room membership, call.join, call.screenshare, and participation in the active call. Captured application audio does not need call.voice. The credential expires after one minute; an established publisher is checked by the same permission reconciliation as the main participant. Returns FAILED_PRECONDITION when no call is active, the caller has not joined it, or voice and video calls are not configured.

POST /api/connect/chatto.api.v1.VoiceCallService/CreateCallMediaPublisherToken

Input: CreateCallMediaPublisherTokenRequest

Section titled “Input: CreateCallMediaPublisherTokenRequest”

Request for a native companion publisher credential.

FieldTypeDescription
room_idstringRequired. Room whose active call receives the media.
kindCallMediaPublisherKindRequired. Kind of native media publisher being started.

Result: CreateCallMediaPublisherTokenResponse

Section titled “Result: CreateCallMediaPublisherTokenResponse”

Credential for one native companion publisher connection.

FieldTypeDescription
tokenstringShort-lived LiveKit JWT token.
e2ee_keystringShared E2EE key for this active call.
call_idstringActive call session ID.

Records the caller’s intent to leave a room call.

Requires room membership, but not call.join or a publishing permission.

Returns left=false when LiveKit is not configured.

POST /api/connect/chatto.api.v1.VoiceCallService/LeaveCall

Request to record leaving a room call.

FieldTypeDescription
room_idstringRequired. Room whose call is being left.

Response from recording a leave intent.

FieldTypeDescription
leftboolTrue when a leave fact was recorded.