WebRTC & Video calls
Video calls in QuanticPhone use WebRTC for peer-to-peer media streams. Configure ICE servers to ensure reliable connectivity across different network setups.
STUN / TURN servers
The Config.RTCConfig table is passed directly to the WebRTC peer connection as the ICE configuration:
-- Default: Google public STUN servers
Config.RTCConfig = {
iceServers = {
{ urls = "stun:stun.l.google.com:19302" },
{ urls = "stun:stun1.l.google.com:19302" },
},
}Recommended production setup with a TURN server:
Config.RTCConfig = {
iceServers = {
{ urls = "stun:stun.l.google.com:19302" },
{
urls = "turn:turn.yourserver.com:3478",
username = "user",
credential = "password",
},
{
urls = "turns:turn.yourserver.com:5349", -- TURN over TLS
username = "user",
credential = "password",
},
},
}Free TURN services: Metered.ca (free tier available), or self-host with Coturn.
Dynamic WebRTC
Config.DynamicWebRTC = {
Enabled = false, -- auto-generate ICE config
Service = "cloudflare", -- "cloudflare" is currently supported
RemoveStun = false, -- strip STUN servers (use only TURN)
}When Enabled = true, QuanticPhone fetches a fresh ICE config from the configured service before each call — useful if your TURN credentials rotate. Currently supports Cloudflare's TURN service (requires a Cloudflare account with Calls API enabled).