Overview
Kyber uses Vivox for spatial audio and proximity voice chat. The VoIP API generates authentication tokens and channel access credentials for players to join voice channels associated with game servers.All VoIP endpoints require authentication with a valid Kyber token.
Methods
Login
Generate Vivox authentication credentials for a user. Endpoint:VoipServer.Login
Request:
No parameters required. User information is extracted from the authentication context.
Vivox authentication token for the user
Vivox username (generated from user’s display name)
User’s display name for voice chat
Vivox issuer identifier
Vivox domain for the voice service
source/API/internal/rpc/voip.go:32-44
JoinChannel
Generate access credentials for joining a server’s voice channel. Endpoint:VoipServer.JoinChannel
Request:
Server ID to join the voice channel for
Vivox channel URI for the positional audio channel
Access token for joining the channel
source/API/internal/rpc/voip.go:46-67
INTERNAL- Failed to retrieve server information or server not found
- Distance: 80 units (maximum hearing distance)
- Rolloff: 1 (linear distance attenuation)
- Max Range: 1 (normalized)
- Clamping Distance: 1
Authentication
All VoIP endpoints require a valid Kyber authentication token passed in the gRPC context. The user model is extracted from the context:Integration
Client Integration Flow
-
Login to VoIP:
- Call
Login()after authenticating with Kyber - Store the returned credentials (token, issuer, domain)
- Call
-
Join Server Channel:
- Call
JoinChannel(server_id)when joining a game server - Use the returned channel URI and access token to connect to Vivox
- Call
-
Spatial Audio:
- Update player position in the Vivox SDK
- Proximity-based audio is handled automatically by Vivox
Token Generation
Tokens are generated using the Vivox token generator with:- User URI:
sip:.{username}.{issuer}.@{domain} - Channel URI:
sip:confctl-p-{server_id}.{issuer}@{domain}
Related Features
Voice Chat Feature
User guide for proximity voice chat
Server Browser
API for browsing and joining servers
Implementation Notes
- VoIP tokens are generated on-demand and do not persist
- Each server has its own positional channel for spatial audio
- The Vivox service is configured with environment variables for issuer and domain
- Channel URIs use the server ID to ensure unique channels per game server