23 lines
1.0 KiB
Markdown
23 lines
1.0 KiB
Markdown
# Signaling protocol (draft)
|
|
|
|
WebSocket endpoint: `/ws/v1/signaling` over TLS.
|
|
|
|
Every message must be authenticated, versioned, size-limited and bound to a call ID and registered device ID. The draft message envelope:
|
|
|
|
```json
|
|
{
|
|
"version": 1,
|
|
"message_id": "random-unique-id",
|
|
"call_id": "random-call-id",
|
|
"sender_device_id": "device-id",
|
|
"recipient_device_id": "device-id",
|
|
"type": "CALL_REQUEST",
|
|
"sent_at": "RFC3339 timestamp",
|
|
"payload": "base64-encoded authenticated protocol payload"
|
|
}
|
|
```
|
|
|
|
Initial message types: `CALL_REQUEST`, `CALL_ACCEPT`, `CALL_REJECT`, `CALL_CANCEL`, `CALL_END`, `SDP_OFFER`, `SDP_ANSWER`, `ICE_CANDIDATE`, `KEY_CONFIRMATION`, `KEY_ROTATION`, `PING`, `PONG`.
|
|
|
|
This is a draft envelope, not a finalized wire protocol. Before implementation, specify canonical serialization, signature/MAC coverage, replay windows, message ordering, idempotency, maximum payload sizes, device authorization and error behavior. Never trust client-supplied sender IDs without binding them to the authenticated session.
|