colossal-shoe-10928
10/23/2025, 2:47 AMtall-airline-16756
10/23/2025, 2:47 AMtall-airline-16756
10/23/2025, 2:48 AMallowed_addresses field empty or skipping authentication can leave your SIP endpoint open to unrestricted access. This might cause flooding issues if many connections come in at once without proper controls.
To help keep things secure and running smoothly, consider these steps:
• Limit the allowed_addresses to specific IP ranges provided by your SIP provider.
• Turn on username/password authentication for your trunk.
• Set up secure dispatch rules, like requiring PIN codes for room access.
• Keep an eye on your SIP trunk usage and logs to catch any unusual activity early.
If you'd like, I’m here to guide you through these configurations in more detail or help with any specific questions you have. Just let me know!
Sources: README.md | src/setup-livekit.ts | SIP inbound trunk | LiveKit Docs | packages/sip--um-actually/src/setup-livekit.ts | lib/livekit/sip_service_client.rbcolossal-shoe-10928
10/23/2025, 2:53 AMtall-airline-16756
10/23/2025, 2:55 AMTrunkIds) serve as a fallback when no specific trunk fits.
2. Handling conflicts with multiple trunks sharing the same DID: By default, LiveKit doesn’t allow conflicting trunks and will reject such configurations. But if you want to allow conflicts, you can enable the WithAllowTrunkConflicts option, which picks the first matching trunk instead of throwing an error. Still, it’s best to keep trunk uniqueness to avoid any confusion.
3. Guidelines for mixing Direct and Individual dispatch rules: For Direct rules, use room_name to route calls to a specific room. For Individual rules, use room_prefix to create unique rooms per call. It’s important to avoid overlapping inbound_numbers between these rule types to prevent conflicts. Remember, Direct rules take priority over Individual rules if their conditions overlap.
4. Tracing RTP media connection issues: To troubleshoot RTP media issues, use SIP-specific logs, track calls using call IDs, and check RTP stats like packet loss and jitter. The CLI offers commands such as lk sip trunk list for managing SIP resources. Although there isn’t a direct lk sip call list command, you can monitor active calls by searching logs with call IDs and reviewing analytics logs.
Please feel free to reach out if you’d like me to walk you through any part of this or if you have more questions. I’m here to help!
Sources: pkg/service/ioservice_sip.go | protobufs/livekit_sip.proto | SIP dispatch rule | LiveKit Docs | SIP trunk setup | LiveKit Docs | Inbound calls with Twilio Voice | LiveKit Docscolossal-shoe-10928
10/23/2025, 2:56 AMtall-airline-16756
10/23/2025, 2:57 AMEvaluateSIPDispatchRules API to simulate an incoming call. Then, simply check the logs for entries like SIP trunk matched or `SIP dispatch rule matched`—this will confirm which trunk and rule were applied. The logs provide helpful details such as toUser, fromUser, src, sipTrunk, and sipRule for thorough tracing. If no rule matches, you’ll see a DROP result, along with explanations in the logs. This way, you can be confident about what’s happening behind the scenes.
2. Setting and verifying Dispatch Rule priority: Dispatch Rule priority is set automatically, taking into account the rule type, PIN protection, and how specific the inbound numbers are. Rules with lower priority values get matched first. For instance, Direct rules that have PINs and specific numbers are given the highest priority. To make sure a particular rule is matched first, you can configure it with a PIN and define InboundNumbers. Feel free to use the API or dashboard to inspect your rules and test them with simulated calls to see if everything behaves as expected.
If you have any questions or need a hand with these configurations or testing steps, please don’t hesitate to ask. I’m here to help!
Sources: pkg/service/ioservice_sip.go | protobufs/livekit_sip.proto | SIP dispatch rule | LiveKit Docs | test/lktest-sip-outbound/README.md | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK