Call session
Idle
User is the Admin account. John Doe and Jane Doe are Client accounts. Calling a client saves a connecting session and returns to the admin dashboard. Once connected, duo view shows User in preview and the called client in program.
Workflow
- Open a client directory page and click Call.
- The admin dashboard opens with the call in connecting state.
- The dashboard marks the call connected after a short delay.
- Duo view locks to User in preview viewer 17 and the called client in program viewer 19.
- Call state and signaling events are POSTed to the Rigitor backend.
Scenarios
- John Doe call: preview User, program John Doe, status connected to John Doe.
- Jane Doe call: preview User, program Jane Doe, status connected to Jane Doe.
- Custom client call: preview User, program the saved directory image for that client.
- Idle call: duo view falls back to the normal panel sources.
VOIP backend structure
The backend stores call session state and a bounded signaling log. This provides the structure for a WebRTC, SIP, or hosted VOIP adapter without hardcoding a provider. Media transport credentials and peer connection negotiation are added on top of these endpoints.
GET /api/call POST /api/call GET /api/call/signal POST /api/call/signal POST /api/call/clear call fields: person, name, phone, email, role, status, startedAt, connectedAt, updatedAt signal fields: id, type, from, to, name, label, sdp, candidate, createdAt
API examples
JavaScript
fetch("/api/call", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ person: "john-doe", status: "connected" })
})
Python
import urllib.request, json
req = urllib.request.Request(
"http://127.0.0.1:49300/api/call",
data=json.dumps({"person": "jane-doe", "status": "connected"}).encode(),
headers={"Content-Type": "application/json"},
method="POST"
)
print(urllib.request.urlopen(req).read().decode())
Curl
curl -X POST http://127.0.0.1:49300/api/call \
-H "Content-Type: application/json" \
-d '{"person":"john-doe","status":"connected"}'