Thanks — I’m responding to your question about SIP rules getting deleted after a restart on a locally hosted LiveKit instance.
SIP rules (trunks and dispatch rules) are kept in memory in the LiveKit server and are not persisted to disk. That means they will be lost on restart. To keep them across restarts you need to recreate them automatically at startup. Two common approaches:
• Store your SIP configuration (trunk definitions, numbers, dispatch rules) in a durable place — e.g., a config file, environment variables, or a database.
• On your application or server startup, call the LiveKit Server API / SDK to recreate the inbound trunks and dispatch rules programmatically. For example, run a startup script that uses the LiveKit Server SDK (Python, JS, etc.) to call create_sip_inbound_trunk and create_sip_dispatch_rule with your saved configuration.
If you’d like, tell me:
• which SDK or language you’re using (Python, Node, Go, etc.), and
• where you prefer to store the config (file, DB, env vars),
and I’ll provide a compact startup script example you can run after each reboot.
Sources:
Creating SIP Inbound Trunks and Dispatch Rules with Python SDK |
Python SDKs | livekit/livekit_composite | DeepWiki, with interactive elements