mammoth-beach-64868
02/27/2026, 9:20 AMtall-airline-16756
02/27/2026, 9:20 AMtall-airline-16756
02/27/2026, 9:20 AMmammoth-beach-64868
02/27/2026, 9:25 AMtall-airline-16756
02/27/2026, 9:25 AMCreateSIPInboundTrunkRequest and CreateSIPDispatchRuleRequest) persist them automatically.
• To remove them you would explicitly call the delete endpoints (for example delete_sip_trunk() or delete_sip_dispatch_rule()).
If you’d like, I can help with next steps:
• Explain which API/CLI call or SDK method to use for creating trunks or rules in your language (tell me which SDK you’re using: Go, Python, JS, etc.).
• Walk through validating that entries exist in your PostgreSQL database (which tables/columns to check) if you want to confirm persistence.
• Show an example payload for a trunk or dispatch rule and how to create it programmatically.
Which of those would be most helpful right now?
Sources: sip | livekit/livekit_composite | DeepWiki | Python SDKs | livekit/livekit_composite | DeepWikimammoth-beach-64868
02/27/2026, 9:27 AMtall-airline-16756
02/27/2026, 9:28 AMlivekit/livekit-server image.)
3. Will you terminate TLS/WSS externally (reverse proxy / LB) or do you want TLS configured in the compose file?
4. Do you want a TURN server included (coturn) for NAT traversal?
5. Any required ports, credentials, or volume paths you must use? Or should I include example credentials and named volumes you can replace?
6. Do you want SIP trunks/dispatch rules preconfigured in the database, or is starting the runtime services enough for now?
7. For SIP networking, do you prefer host network mode (often needed for SIP RTP) or the default Docker bridge?
If you prefer, I can start with a sensible default set (FreeSWITCH, latest LiveKit image, no TLS, include coturn, example creds, and bridge networking) and you can adjust after. Which option do you want me to use?mammoth-beach-64868
02/27/2026, 9:30 AMtall-airline-16756
02/27/2026, 9:30 AMversion: "3.8"
services:
redis:
image: redis:7-alpine
container_name: livekit_redis
restart: unless-stopped
volumes:
- redis_data:/data
command: ["redis-server", "--save", "900", "1", "--appendonly", "yes"]
networks:
- livekit_net
postgres:
image: postgres:15-alpine
container_name: livekit_postgres
restart: unless-stopped
environment:
POSTGRES_DB: livekit
POSTGRES_USER: livekit
POSTGRES_PASSWORD: livekitpassword
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- livekit_net
livekit:
image: livekit/livekit-server:v1.9.7
container_name: livekit_server
restart: unless-stopped
depends_on:
- redis
- postgres
ports:
- "7880:7880" # API / mixed (plaintext)
- "7881:7881" # internal grpc-web, optional
- "7882:7882" # optional additional port if needed
environment:
# Keys and secrets - replace in production
- LIVEKIT_API_KEY=example_api_key
- LIVEKIT_API_SECRET=example_api_secret
# Storage / DB config
- LIVEKIT_DB=<postgres://livekit:livekitpassword@postgres:5432/livekit?sslmode=disable>
# Redis URL for ephemeral state/signaling (LiveKit uses Redis for ephemeral)
- LIVEKIT_REDIS=<http://redis:6379>
# Prometheus metrics - optional
- LIVEKIT_PROMETHEUS=true
# Logging level
- LOG_LEVEL=info
# Optional: allow all origins for easy local testing (restrict in production)
- LIVEKIT_ALLOW_ORIGINS=*
volumes:
- livekit_data:/var/lib/livekit
networks:
- livekit_net
volumes:
redis_data:
postgres_data:
livekit_data:
networks:
livekit_net:
driver: bridge
Quick verification steps after starting:
1. Start services:
a. docker-compose up -d
1. Confirm containers are healthy:
a. docker-compose ps
1. Confirm LiveKit can reach Postgres and Redis by checking logs:
a. docker logs -f livekit_server
b. Look for messages about successful DB connection and Redis connection.
How to create SIP trunks / dispatch rules (brief)
• Use the LiveKit API/CLI or server SDKs to create SIP trunks and dispatch rules. Those are persisted automatically into Postgres for self-hosted deployments and will survive restarts.
If you want:
• I can add a sample init script that seeds example SIP trunk and dispatch rule records into Postgres (tell me which SDK or API you prefer).
• I can add coturn, TLS reverse proxy (Traefik or Nginx), or a SIP server (FreeSWITCH / Asterisk) to the compose file.
• I can adjust the Postgres and Redis config for production readiness (auth, backups, persistence options).
Which addition would you like next?