Appearance
Calls
Who: listener on a registered device; system (ring timeouts, sweeps, reminders).
Entry points
| Kind | Entry |
|---|---|
| REST | POST /calls, GET /calls/:id, POST /calls/:id/accept, /decline, /end, /invite, /join, /token, GET /calls/:id/session, GET/POST /calls/:id/messages, POST /calls/:id/participants/:userId/remove, /mute, PUT …/role, POST /calls/:id/end-all |
| REST (history) | GET /calls/history, GET /calls/history/missed-count, POST /calls/history/seen, DELETE /calls/history/:logId |
| REST (links) | POST /call-links, GET /call-links/upcoming, GET /call-links/:code, POST /call-links/:code/join, POST /call-links/:code/rsvp, POST /call-links/:id/cancel, DELETE /call-links/:id |
Socket /call | call:start, call:ringing, call:accept, call:decline, call:end, call:invite, call:join, call:join-link, call:state, call:upgrade-request, call:upgrade-respond, call:screen-share, call:renew-token, call:heartbeat, call:session, call:mute, call:camera, call:camera-switch, call:audio-route, call:hold, call:network, call:hand, call:hand-lower, call:share-start, call:share-stop, call:reaction, call:message, call:messages, call:participant-add, call:participant-remove, call:participant-mute, call:role, call:end-all, call:get |
| Deep link | call (call/:code, call links) |
| Push | call.incoming (VoIP: PushKit / FCM high), call.missed, call.scheduled, call.starting_soon |
Flow
- Start:
call:start { userIds | conversationId, media }→ringing,CallSessionwith Agora credentials andaes_256_gcm2key; eventcalls.call.started. Callees blocked or refusing bywho_can_callare skipped (group) or refused (1:1). - Ring:
call:incomingto every callee device +call.incomingVoIP push; callee device sendscall:ringing.calls.ring-timeout(45 s) marks missed. - Answer:
call:accept→accepted; other devices of the callee getcall:answered-elsewhere.call:decline→ declined; another active call →CALL_BUSY/call:busy. - In call: heartbeat every 30 s (90 s silence = left); toggles
call:mute,call:camera,call:hold,call:hand,call:share-start(own screen uid),call:upgrade-requestaudio→video,call:reaction,call:message. Each broadcastscall:participant-updated.call:renew-tokenbefore expiry. Reconnect →call:sessionsnapshot. - Add people:
call:participant-add { userIds }(rings them); joiners in progress usecall:join. Moderators remove/mute; owner/admin set roles,call:end-all. - End:
call:end(last one out ends it) →ended,call:ended, eventcalls.call.ended, call-log rows and a chat timeline item. Time-limit warning 2 min before 4 h.calls.sweep(minutely) settles lost timers. - Scheduled:
POST /call-links { title, scheduledStartAt, invitees }→call.scheduledto invitees;rsvp;call.starting_soon10 min before; join opens 15 min early (CALL_NOT_STARTEDbefore, except for the creator);POST /call-links/:code/joinorcall:join-link.
Joining by link
- A call link (
https://spread.plemuz.com/call/<code>,links.call) opens the guest-safe preview: title, host, start time, whether the call is live and how many people are in it. - Joining requires sign-in. A guest gets
UNAUTHENTICATEDwith asign_inaction that returns to the link.- A scheduled call opens 15 minutes before its start (
CALL_NOT_STARTEDbefore that, except for the creator). - On the link, the user either joins the call already running there or starts one.
- A scheduled call opens 15 minutes before its start (
- The link's creator can rotate it (new code, old one dead), reset it (fresh link with the same settings and invitees) or revoke it.
- Inside an ongoing group call, moderators and up can create a shareable link (
POST /calls/:id/linkorcall:link-create); repeating the request returns the same link.
Exit states
| State | Code | Actions | Client next |
|---|---|---|---|
| Connected | — | — | Join Agora with rtc |
| Busy | CALL_BUSY | retry | — |
| Blocked / not allowed | CALL_BLOCKED, CALL_NOT_ALLOWED | — | — |
| Device not bound | CALL_DEVICE_REQUIRED | sign_in | — |
| Too many | CALL_PARTICIPANT_LIMIT | — | — |
| Ended | CALL_ALREADY_ENDED, CALL_INVALID_TRANSITION | — | Close the call screen |
| Link | CALL_LINK_INVALID, CALL_LINK_EXPIRED, CALL_NOT_STARTED (wait) | as listed | — |
| Screen taken | CALL_SCREEN_SHARE_TAKEN | — | — |
| Agora down | CALL_PROVIDER_UNAVAILABLE | retry | — |