Contact usRequest a demo

Setting up audio and video calls with LiveKit

This article provides information on how to set up Unblu to use LiveKit to establish audio and video calls.

How LiveKit works in general is outlined in the LiveKit documentation.

Deployment options

Unblu Cloud and LiveKit

If you’re using the Unblu Cloud, LiveKit is provided as a service out of the box and you don’t have to configure anything.

Unblu on-premises and LiveKit in the Unblu Cloud

If you have an on-premises Unblu installation, you can still use LiveKit as an Unblu Cloud service. In this case, you must configure Unblu to use LiveKit as explained below, but Unblu provides you with the server, API keys, and secrets required for LiveKit.

Take note of the following additional information:

  • The LiveKit signalling service uses tcp/443. You must allow WebSockets.

  • LiveKit worker nodes receive direct traffic on udp/50000-60000. Allowing direct access to worker nodes improves latency a bit but typically isn’t possible in an enterprise environment as the worker nodes do not have static IPs. If the worker nodes aren’t directly accessible for users, the TURN server relays traffic to the worker nodes.

  • The TURN server is available via tcp/3478, udp/3478, tcp/5349, udp/5349, and tcp/443. Technically it’s possible only to allow connections to the TURN server on certain ports. However, to improve stability you should open as many of the above ports as possible. You should open at least one UDP port unless you have very good reasons not to.

  • Traffic to and from the TURN server is very sensitive to network delays. You should therefore allow direct access to the TURN server, skipping any intermediate proxy servers such as web security filters.

The endpoints of LiveKit in the Unblu Cloud are listed by region below.

europe-west4 (Netherlands)

Service

Environment

Stage

Production

LiveKit signalling server

nl.sfu.ustage.app 34.49.89.75

nl.sfu.unblu.app 34.49.233.8

TURN server

nl.turn.ustage.app 35.204.138.222

nl.turn.unblu.app 34.32.166.131

europe-west6 (Switzerland)

Service

Environment

Stage

Production

LiveKit signalling server

ch.sfu.ustage.app 34.49.99.180

Available on request

TURN server

ch.turn.ustage.app 34.65.150.168

ch.turn.unblu.app 34.65.137.3

northamerica-northeast-1 (Canada)

Service

Environment

Stage

Production

LiveKit signalling server

Available on request

Available on request

TURN server

ch.turn.ustage.app 34.65.150.168

ch.turn.unblu.app 34.65.137.3

us-central1 (USA)

Service

Environment

Stage

Production

LiveKit signalling server

us.sfu.ustage.app 34.49.151.110

us.sfu.unblu.app 34.160.139.203

TURN server

us.turn.ustage.app 35.222.152.150

us.turn.unblu.app 35.224.85.138

Unblu on-premises and LiveKit

If you choose to run LiveKit on-premises, you have to set up and deploy your own LiveKit server. For more information on how to do so, refer to the LiveKit documentation.

LiveKit offers several deployment models, such as to a single VM (not scalable, and limited to up to 3000 call participants), or to a scalable Kubernetes cluster.

If you want to deploy LiveKit to a Kubernetes cluster, you must take into account the following statement from the LiveKit documentation:

LiveKit pods require direct access to the network with host networking. This means that the rtc.udp/tcp ports that are open on those nodes are directly handled by LiveKit server. With that direct requirement of specific ports, it means we’ll be limited to one LiveKit pod per node. It’s possible to run other workload on those nodes.
— LiveKit documentation
Deploy to Kubernetes: Understanding the deployment

Additionally, each node running LiveKit must have its own public IP address.

One way to meet these requirements, at least in principle, without directly exposing other nodes in the cluster to the internet is to isolate LiveKit by deploying it to a dedicated Kubernetes cluster. However, you shouldn’t underestimate the obstacles you must overcome.

Running LiveKit on a VM in your DMZ may be easier to reconcile with the IT strategy of organizations that put a premium on security.

If you have any concerns about running LiveKit on-premises, you should consider using Unblu’s LiveKit cloud service instead. For more information, contact your Unblu account manager.

Configuring Unblu to use LiveKit

Once you’ve set up your LiveKit server, configure Unblu to use it. Set the following configuration properties at the ACCOUNT level:

Video chat limitations

  • If a visitor navigates to a new page inside the Unblu-instrumented web page, the video connection is disrupted while the page loads and automatically re-establishes a connection as soon as possible. To work around this, visitors can use the pop-out feature.

  • The video chat can only be displayed in one browser window or tab. If the visitor has several tabs or windows open and they belong to the same Unblu conversation, the video chat stays in one window. If the user wants to transfer the video chat to a different window, they can do so in the chat user interface.

  • Currently, Unblu only supports up to six concurrent video chat participants.

  • Audio level indicators aren’t supported. A workaround is in place to indicate if a participant is speaking.

See also