melodic-needle-31348
12/18/2025, 8:55 AMtall-airline-16756
12/18/2025, 8:55 AMtall-airline-16756
12/18/2025, 8:56 AMmelodic-needle-31348
12/18/2025, 9:02 AMtall-airline-16756
12/18/2025, 9:03 AMcall-)
◦ Route to a fixed room name (e.g., support-room)
◦ Route based on the called number or caller (describe mapping)
Reply with those answers and I’ll provide the precise curl requests (pointed at your Docker host), example JWT creation notes, and any Google Cloud firewall/port reminders you should check.melodic-needle-31348
12/18/2025, 9:08 AMtall-airline-16756
12/18/2025, 9:09 AMcall-.
Before you run the examples, confirm these values:
• Your LiveKit HTTP(S) endpoint (replace <your-livekit-host>, e.g. https://livekit.example.com or http://34.35.36.37:7880)
• A JWT that has SIP-admin permissions (replace <jwt-token>)
• The SIP server is reachable on port 5060 and RTP ports 10000–20000 from your SIP provider (Google Cloud firewall and any host firewall must permit these)
1) Create an inbound trunk (accept any number) Use the CreateSIPInboundTrunk API and pass an empty or broad numbers list — to accept any number, omit numbers (the SIP service will accept calls not matched by specific trunks) or explicitly create a trunk without restricting numbers. Example curl:
curl -X POST "<your-livekit-host>/twirp/livekit.SIP/CreateSIPInboundTrunk" \
-H "Authorization: Bearer <jwt-token>" \
-H "Content-Type: application/json" \
-d '{
"name": "inbound-any",
"numbers": []
}'
• Replace <your-livekit-host> and <jwt-token>.
• If the API requires at least one number, provide a broad DID you control; otherwise leaving numbers empty makes the trunk act as a catch-all.
2) Create the dispatch rule to create rooms with prefix call- Use CreateSIPDispatchRule with a rule that uses roomPrefix. Example curl:
curl -X POST "<your-livekit-host>/twirp/livekit.SIP/CreateSIPDispatchRule" \
-H "Authorization: Bearer <jwt-token>" \
-H "Content-Type: application/json" \
-d '{
"dispatch_rule": {
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"name": "create-room-per-call"
}
}'
3) JWT notes
• The Authorization header must be a JWT with SIP admin permissions (the SIP APIs require admin-scope credentials).
• If you need an example for generating a JWT from your API key/secret, tell me and I’ll provide a snippet for your environment (Node, Go, or curl).
4) Google Cloud / firewall reminders
• Open UDP/TCP 5060 (SIP) and UDP 10000–20000 (RTP) on the VM’s external firewall and Google Cloud VPC firewall.
• Ensure the Docker container is publishing those ports to the host (check your docker-compose or container port mapping).
• If running behind NAT, set use_external_ip: true in the SIP config and ensure the external IP is reachable.
5) Verify configuration
• Check the trunk list and dispatch rules via the respective API list endpoints (ListSIPInboundTrunks / ListSIPDispatchRules) or via logs from the livekit-sip container.
• Make a test call from a SIP provider (or softphone) to your SIP URI (sip<your public ip>5060) and confirm a room named like call-<something> is created in LiveKit and the call is bridged.
• Inspect livekit-sip container logs for incoming INVITE handling and dispatch decisions.
If you want, I can:
• provide a JWT generation example for Node or Go,
• show List API calls to confirm the created trunk and rule,
• or give exact docker-compose port mappings to verify your setup. Which would you like next?