Peer-to-peer voice
A peer-to-peer voice call connects its participants directly, as Peer-to-peer voice describes. Fluxer hands out STUN servers only and never relays media, so whether two participants connect depends on their networks. Clients report how each peer connection settled, so an operator can see which networks connect directly.
The route on this page is user-only. Fluxer rejects a bot or OAuth2 credential with 403 ACCESS_DENIED.
Connection report object
Section titled “Connection report object”The outcome of one peer connection, as seen from the reporting client. A client sends one report for each remote peer of a call, once the connection to that peer reaches connected or fails.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| channel_id1 | snowflake | The ID of the guild voice channel or private channel of the call |
| guild_id | ?snowflake | The ID of the guild of the channel, null for a call |
| participant_count | integer | Participants in the call when the connection settled (2-4) |
| outcome | string | connected or failed |
| local_candidate_type2 | ?string | Candidate type of the local end of the selected pair |
| remote_candidate_type2 | ?string | Candidate type of the remote end of the selected pair |
| ip_family3 | ?string | ipv4 or ipv6, the address family of the selected pair |
| protocol3 | ?string | udp or tcp, the transport of the selected pair |
| setup_ms4 | ?integer | Milliseconds from creating the connection to its first connected state (0-2,147,483,647) |
| ice_restarted | boolean | Whether the connection ran an ICE restart |
1 Fluxer stores the value with no check that the channel exists or that the caller was in its call
2 One of host, srflx, prflx, or relay, and null when the connection has no selected candidate pair
3 Null when the connection has no selected candidate pair
4 Null for a connection that never reached connected
Example
Section titled “Example”{ "channel_id": "1189375284394692610", "guild_id": null, "participant_count": 2, "outcome": "connected", "local_candidate_type": "srflx", "remote_candidate_type": "host", "ip_family": "ipv6", "protocol": "udp", "setup_ms": 840, "ice_restarted": false}Report connection outcomes
Section titled “Report connection outcomes”POST/v1/voice/p2p/connection-reportsRecords 1 through 8 connection report objects and returns 204 with an empty body. User-only. Emits no Gateway event.
A client batches its reports and sends them best effort. A failed or rate-limited request changes nothing about the call, and a client drops the batch rather than retrying more than once.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| reports1 | array[connection report object] | The reports to record (1-8) |
1 A list of fewer than 1 or more than 8 entries, or any invalid entry, fails with 400 INVALID_FORM_BODY and records nothing
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | Every report was recorded, or peer-to-peer voice is disabled on the instance and nothing was recorded |
| 400 | error response | The body is invalid and the request returns INVALID_FORM_BODY |
| 403 | error response | Caller is a bot or presents a bearer credential and the request returns ACCESS_DENIED |
Side effects
Section titled “Side effects”Fluxer stores each report with the caller’s user ID, the time of the request, the request address and its country, and the client platform and operating system of the caller’s session. The country is null when the address resolves to none. Reports expire after 180 days.
Fluxer keeps each report for 180 days. No route reads reports back.
Rate limit
Section titled “Rate limit”10 requests per minute for each authenticated user, on the voice:p2p:connection_reports bucket.