salmon-lighter-12882
09/07/2025, 3:06 PMtall-airline-16756
09/07/2025, 3:06 PMtall-airline-16756
09/07/2025, 3:07 PMsalmon-lighter-12882
09/07/2025, 3:09 PMtall-airline-16756
09/07/2025, 3:09 PMinbound-trunk.json with the following content:
{
"trunk": {
"name": "My Inbound Trunk",
"numbers": [
"+15105550100"
],
"auth_username": "<your_sip_username>",
"auth_password": "<your_sip_password>"
}
}
Then just run this command:
lk sip inbound create inbound-trunk.json
• Using SDKs: If you prefer coding, here’s how you can do it with the LiveKit Server SDK (like Node.js):
const trunk = await sipClient.createSipInboundTrunk(
'inbound-trunk',
['+15105550100'],
{
auth_username: 'TWILIO_SIP_USERNAME',
auth_password: 'TWILIO_SIP_PASSWORD',
}
);
2. Create a SIP Dispatch Rule
This part decides how calls get routed to your LiveKit rooms:
• Using CLI: Create a file named dispatch-rule.json with this content:
{
"dispatch_rule": {
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
}
}
}
Then run this command:
lk sip dispatch-rule create dispatch-rule.json
• Using SDKs: Or, using the LiveKit Server SDK (Node.js example):
await sipClient.createSipDispatchRule(
{
type: 'individual',
roomPrefix: 'call',
},
{
name: 'inbound-dispatch-rule',
trunkIds: [trunk.sipTrunkId],
}
);
3. A Few Notes for Your Local SIP Server Setup
Make sure your local SIP server has:
• A publicly accessible IP or domain
• The SIP port open (default is 5060) and RTP port range exposed (default 10000–20000)
• A config.yaml file configured with your LiveKit credentials and Redis settings
You can run the SIP service either with Docker or natively using this configuration.
If you hit any bumps or want me to walk you through any of these steps, just give me a shout—I’m here to help!
Sources: src/setup-livekit.ts | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | sipclient.go | src/main/kotlin/io/livekit/server/SipServiceClient.kt | SIP Integration | livekit/livekit_composite | DeepWikisalmon-lighter-12882
09/07/2025, 3:13 PMtall-airline-16756
09/07/2025, 3:15 PM