Peer-to-peer voice
In a peer-to-peer voice call, Fluxer gives clients STUN servers only and never relays media. Clients send a report for each peer connection once it connects or fails. Fluxer stores the reports, and no API returns them.
Connection report object
Section titled “Connection report object”The outcome of one peer connection, as the reporting client saw it.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel or private channel |
| guild_id | ?snowflake | The ID of the guild, null in a private channel |
| participant_count | integer | Number of people in the call when the connection connected or failed (2-4) |
| outcome | string | connected or failed |
| local_candidate_type | ?string | host, srflx, prflx or relay for the local end of the selected pair, null without one |
| remote_candidate_type | ?string | host, srflx, prflx or relay for the remote end of the selected pair, null without one |
| ip_family | ?string | ipv4 or ipv6, null without a selected pair |
| protocol | ?string | udp or tcp, null without a selected pair |
| setup_ms | ?integer | Milliseconds from creating the connection until it first connected, null if it never connected |
| ice_restarted | boolean | Whether the connection ran an ICE restart |
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 connection reports. Fluxer keeps each report for 180 days, together with your user ID, your IP address and its country, and your session's platform and operating system. When peer-to-peer voice is off on the instance, the request returns 204 and stores nothing.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| reports | array[connection report object] | The reports to record (1-8) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The reports were recorded |
| 400 | error response | INVALID_FORM_BODY when any report is invalid, and nothing is recorded |
| 403 | error response | ACCESS_DENIED when the caller is a bot or uses an OAuth2 bearer token |
The rate limit is 10 requests per minute, on the voice:p2p:connection_reports bucket.