Self-hosted SIP server

Setting up and configuring a self-hosted SIP server for LiveKit telephony apps.

caution:

Both SIP signaling port (5060) and media port range (10000-20000) must be accessible from the Internet.

Docker compose

The easiest way to run SIP Server is by using Docker Compose:

wget https://raw.githubusercontent.com/livekit/sip/main/docker-compose.yaml
docker compose up

This starts a local LiveKit Server and SIP Server connected to Redis.

Running natively

You may also run SIP server natively without Docker.

1. Install SIP server

Follow instructions here.

2. Create config file

Create a file named config.yaml with the following content:

api_key: <your-api-key>
api_secret: <your-api-secret>
ws_url: ws://localhost:7880
redis:
address: localhost:6379
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: true
logging:
level: debug

3. Run SIP server:

livekit-sip --config=config.yaml

4. Determine your SIP URI

Once your SIP server is running, you would have to determine the publilc IP address of the machine.

Then your SIP URI would be:

<public-ip-address>:5060