Calls
GET /v1/accounts/{a}/calls/current
Show whether the account is in a call, the incoming offer and the available call features.
Scope: calls
| Parameter | In | Type | Description |
|---|---|---|---|
a (required) | path | string | Account ID or alias. |
Response: CallSnapshot
GET /v1/accounts/{a}/calls/socket
Open the call control WebSocket for commands and events. See calls-websocket.txt.
Scope: calls
| Parameter | In | Type | Description |
|---|---|---|---|
a (required) | path | string | Account ID or alias. |
POST /v1/accounts/{a}/calls/tickets
Issue a short-lived single-use ticket for opening a call WebSocket from a browser.
Scope: calls
| Parameter | In | Type | Description |
|---|---|---|---|
a (required) | path | string | Account ID or alias. |
Request body: CallTicketRequest
Response: CallTicketResponse
GET /v1/accounts/{a}/calls/{call}/media
Open the call media WebSocket that carries binary audio and video for a call you own. See calls-websocket.txt.
Scope: calls
| Parameter | In | Type | Description |
|---|---|---|---|
a (required) | path | string | Account ID or alias. |
call (required) | path | string | Call ID. |
Types
CallAudioFormat
The PCM format of call audio. The daemon currently supports only 16,000 Hz, mono, 20 ms frames.
| Field | Type | Description |
|---|---|---|
channels (required) | integer | Number of interleaved channels. |
frameMs (required) | integer | Length of one audio frame in milliseconds. |
sampleRate (required) | integer | Samples per second, per channel. |
CallCapabilities
Calling operations that are available. A missing flag means unavailable.
| Field | Type | Description |
|---|---|---|
conferenceAudio | boolean | Audio in conference calls is available. |
conferenceCreate | boolean | Starting a conference call in a group is available. |
conferenceInvite | boolean | Inviting more contacts into a connected conference call is available. |
conferenceJoin | boolean | Joining a conference call from an invitation is available. |
conferenceVideo | boolean | Video in conference calls is available. |
directAudio | boolean | Direct voice calls with one contact are available. |
directVideo | boolean | Direct video calls are available. |
CallConferenceInvitation
A conference call this account can join. It carries no room credentials.
| Field | Type | Description |
|---|---|---|
callerId (required) | string | Contact ID of the caller. |
groupId (required) | string | The group the conference call is in. |
invitationId (required) | string | Opaque ID for this account. Send it in call.join. |
revision (required) | integer | Revision of the invitation. Send it in call.join exactly as listed. |
CallControl
A control a call participant can report. A microphone or camera update does not reset the call’s audio format.
| Value | Description |
|---|---|
| object | The participant’s microphone. |
| object | The participant’s camera. |
CallDirection
Whether this account placed the call or received it.
| Value | Description |
|---|---|
| ”incoming” | Another party called this account. |
| ”outgoing” | This account placed the call. |
CallKind
Whether a call is with one contact or with a group.
| Value | Description |
|---|---|
| ”direct” | A call with one contact. |
| ”conference” | A call in a group. |
CallMembership
Whether a participant is in a conference call.
| Value | Description |
|---|---|
| ”joined” | In the room. |
| ”invited” | Invited but not in the room. |
| ”left” | Was in the room and left. |
| ”unknown” | The server has not said. |
CallOffer
An incoming call that can be answered or rejected now.
| Field | Type | Description |
|---|---|---|
callId (required) | string | ID of the offered call. |
callType (required) | CallType | Whether the call is voice or video. |
callerId (required) | string | Contact ID of the caller. |
kind (required) | CallKind | Whether the call is direct or a conference. |
revision (required) | integer | Increases when the offer changes. Send the latest value as expectedRevision when answering or rejecting. |
CallParticipant
One participant in a conference call.
| Field | Type | Description |
|---|---|---|
cameraEnabled | boolean, nullable | Whether the participant’s camera is on. Omitted until the server reports it; an omitted value is unknown, not false. |
contactId (required) | string | Contact ID of the participant. |
membership (required) | CallMembership | Whether the participant is in the room. |
microphoneEnabled | boolean, nullable | Whether the participant’s microphone is on. Omitted until the server reports it; an omitted value is unknown, not false. |
participantId (required) | string | ID of the participant within this call. It is not a contact ID; use it to match audio tracks to participants. |
status | CallParticipantStatus or , nullable | Signaling progress, separate from membership. Omitted until reported. |
CallParticipantControl
A control reported by one participant.
| Field | Type | Description |
|---|---|---|
control (required) | CallControl | The control and its value. |
participantId (required) | string | The participant the control belongs to. In a direct call this is the contact ID. |
CallParticipantStatus
Signaling progress of a participant, independent of membership.
| Field | Type | Description |
|---|---|---|
code (required) | integer | The status number the service reported. Keep it for codes kind does not name. |
kind (required) | CallParticipantStatusKind | What the code means. |
CallParticipantStatusKind
What a participant status code means. Cancelled, busy, rejected and no response do not by themselves mean a participant left.
| Value | Description |
|---|---|
| ”undefined” | Code 0: no state reported. |
| ”joined” | Code 1: in the room. |
| ”invited” | Code 2: invited, not in the room. |
| ”acknowledged” | Code 3: invited and acknowledged, not in the room. |
| ”left” | Code 4: left the room. |
| ”cancelled” | Code 5: cancelled. |
| ”busy” | Code 6: busy. |
| ”rejected” | Code 7: rejected. |
| ”no_response” | Code 8: no response. |
| ”unknown” | Any other code. No join or departure is implied. |
CallPendingOffer
An incoming call that cannot be answered yet, because it is waiting for a ready client or for the daemon to finish preparing it.
| Field | Type | Description |
|---|---|---|
callId (required) | string | ID of the incoming call. |
callType (required) | CallType | Whether the call is voice or video. |
callerId (required) | string | Contact ID of the caller. |
kind (required) | CallKind | Whether the call is direct or a conference. |
phase (required) | CallPendingPhase | What the call is waiting for. |
revision (required) | integer | Increases when the offer changes. |
CallPendingPhase
How far along an incoming call is before it can be answered.
| Value | Description |
|---|---|
| ”waiting_for_ready” | Waiting for a client to advertise readiness. |
| ”preparing” | The daemon is preparing the call. |
CallSnapshot
The state of calling for one account, as returned by the HTTP snapshot route. The hello event carries the same fields.
| Field | Type | Description |
|---|---|---|
audioFormat (required) | CallAudioFormat | The PCM format used for call audio. |
availability (required) | CallsAvailability | Whether this account is in a call. |
capabilities (required) | CallCapabilities | Calling operations that are available. |
conferenceInvitations (required) | array of CallConferenceInvitation | Conference calls this account can join. |
currentCall (required) | CallView or , nullable | The active call, or null. |
currentOffer (required) | CallOffer or , nullable | The incoming call that can be answered now, or null. |
currentPendingOffer (required) | CallPendingOffer or , nullable | An incoming call that cannot be answered yet, or null. |
videoCapabilities | CallVideoCapabilities or , nullable | Video codecs and bounds this daemon can exchange. Omitted when video is unavailable. |
CallState
Where a call is in its life. Stop sending audio at ending, and keep the control socket connected while the daemon finishes cleanup.
| Value | Description |
|---|---|
| ”offered” | An incoming call is waiting to be answered or rejected. |
| ”dialing” | An outgoing call is being placed. |
| ”ringing” | The other side is ringing. |
| ”connecting” | The call was accepted and audio is being set up. |
| ”connected” | The call is up and audio can flow. |
| ”ending” | The call is being hung up. |
| ”ended” | The call is over. |
| ”uncertain” | The outcome could not be confirmed. |
CallTicketRequest
Request body for issuing a short-lived single-use browser WebSocket ticket.
| Field | Type | Description |
|---|---|---|
callId | string, nullable | Required when socket is media; omitted when socket is control. |
socket (required) | CallTicketSocket | Which calls WebSocket this ticket authorizes. |
CallTicketResponse
Response returned when issuing a single-use browser WebSocket ticket.
| Field | Type | Description |
|---|---|---|
callId | string, nullable | Bound call ID when socket is media. Omitted for control. |
expiresAt (required) | integer | Unix timestamp in seconds when the ticket expires. |
expiresInSeconds (required) | integer | Ticket lifetime in seconds from issuance. |
socket (required) | CallTicketSocket | Which calls WebSocket this ticket authorizes. |
ticket (required) | string | Opaque single-use ticket to pass as ?ticket= on the matching WebSocket URL. Do not log it. |
CallTicketSocket
Which calls WebSocket a single-use browser ticket authorizes.
| Value | Description |
|---|---|
| ”control” | The call control WebSocket (/v1/accounts/{a}/calls/socket). |
| “media” | The call media WebSocket (/v1/accounts/{a}/calls/{call}/media). |
CallType
Whether a call is voice or video, independent of the media currently negotiated. A video call can continue with audio only.
| Value | Description |
|---|---|
| ”voice” | A voice call. |
| ”video” | A video call. |
CallVideoCapabilities
Video codecs and bounds advertised by the daemon or a ready client.
| Field | Type | Description |
|---|---|---|
maxFps | integer, nullable | Maximum frame rate in frames per second. Omitted when no cap is specified. |
maxHeight | integer, nullable | Maximum frame height in pixels. Omitted when no cap is specified. |
maxWidth | integer, nullable | Maximum frame width in pixels. Omitted when no cap is specified. |
receiveCodecs (required) | array of CallVideoCodec | Video codecs deliverable to a receiving client, in preference order. |
sendCodecs (required) | array of CallVideoCodec | Video codecs accepted from a sending client, in preference order. |
CallVideoCodec
Video codec exchanged on a call media track.
| Value | Description |
|---|---|
| ”h265” | Annex-B H.265 / HEVC frames. |
| ”h264” | Annex-B H.264 / AVC frames. |
| ”jpeg” | Standalone JPEG still frames. |
CallView
A call this account is in.
| Field | Type | Description |
|---|---|---|
callId (required) | string | ID of the call. |
callType (required) | CallType | Whether the call is voice or video. |
controls | array of CallParticipantControl | The latest controls reported by the other party of a direct call, also given to a newly connected observer. Omitted until one is reported. |
direction (required) | CallDirection | Whether this account placed the call or received it. |
groupId | string, nullable | The group of a conference call. Omitted for a direct call. |
kind (required) | CallKind | Whether the call is direct or a conference. |
ownedByThisClient (required) | boolean | True when this connection owns the call. Always false in HTTP snapshots. |
participants | array of CallParticipant | The latest conference roster. Omitted for a direct call. |
revision (required) | integer | Increases each time the call changes. Send the latest value as expectedRevision. |
state (required) | CallState | Where the call is in its life. |
CallsAvailability
Whether this account is in a call.
| Field | Type | Description |
|---|---|---|
busy (required) | boolean | True while this account has a call, including one whose outcome is unresolved, so a new call cannot start. |
ownedByThisClient (required) | boolean | True when this connection owns that call. |