High Scripts

Documentation

Video Calls

Configuring video calls

Introduction

Our video call system is based on WebRTC. By default, it works on a P2P (peer to peer) basis, but that may cause some problems:

  • IP leakage to the peer
  • Firewall blocking

Due to that, we recommend enabling the TURN server that acts as an intermediary between the peers and prevents leaking your IP address, plus resolves most issues with player computer firewalls.

Setting up TURN server with Cloudflare

We support Cloudflare's TURN server out of the box. Here's a quick tutorial on how to set it up.

Register on Cloudflare

Head on to their official website and create a new account or login if you already have one!

Create a TURN server

In the Cloudflare dashboard, on the left, scroll down and navigate to Realtime > TURN Server and then click on Create

Cloudflare dashboard

Copy the credentials

After you create a TURN Server, with a name of your choice, copy the Turn Token ID, the API Token and navigate to your phone files, high-phone/config/server.lua and modify the following configuration:

server.lua
webrtc = {
    turn = {
        -- By default, this will be commented, uncomment it.
        cloudflare = {
            ttl = 86400, -- Keep this as is.
            tokenId = 'Paste your Token ID here',
            apiToken = 'Paste your API Token here',
        }
    }
}

Last updated on