i have a livekit server running using docker, and ...
# ask-ai
m
i have a livekit server running using docker, and now i want a sip server. i ran this command : wget https://raw.githubusercontent.com/livekit/sip/main/docker-compose.yaml and now i am going to run docker compose up. should i stop the already running server?
t
Thanks for reaching out, Milind. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
There's no need to stop your already running LiveKit server before running
docker-compose up
for the SIP server. The
docker-compose.yaml
file we provided is thoughtfully designed so that both the LiveKit server and the SIP server can run together smoothly and communicate with each other. Actually, the SIP server depends on the LiveKit server being up and accessible to work properly. If you have any questions or need further help, feel free to ask! Sources: Self-hosted SIP server | LiveKit docs | test/client/README.md
m
This dockerfile starts a local LiveKit Server and SIP Server connected to Redis. and i already have a liveit server running. now?
t
It’s great that you already have a LiveKit server running! To make sure everything works smoothly, you shouldn’t start another LiveKit server using the SIP server Dockerfile. Instead, let’s connect your SIP server to your existing LiveKit server and Redis instance. Here’s a simple guide to help you through it: 1. Ensure Redis is shared: The SIP server needs to use the same Redis address as your current LiveKit server. 2. Configure the WebSocket URL: Update the
ws_url
in your SIP server configuration to point to your existing LiveKit server (for example, `ws://your-livekit-host:7880`). 3. Use host networking: When running the SIP container, use
--network host
or make sure to properly map UDP ports 5060 (SIP) and 10000-20000 (RTP). 4. Set environment variables or a config file: Provide your
api_key
,
api_secret
, and the
ws_url
either through environment variables or a config file using
SIP_CONFIG_BODY
or
SIP_CONFIG_FILE
. Here’s an example command to run the SIP server:
Copy code
docker run --rm \
  -e SIP_CONFIG_BODY="api_key: your-key
api_secret: your-secret
ws_url: ws://your-livekit-host:7880
redis:
  address: your-redis-host:6379" \
  --network host \
  livekit/sip
Also, please double-check that your firewall settings allow access to SIP (port 5060) and RTP (ports 10000-20000) from the internet. If you have any questions or need further help, I’m here for you! Sources: test/integration/sip_test.go | Self-hosted SIP server | LiveKit docs