m
hi
t
Thanks for reaching out, Rahib. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you out! Could you please share a bit more about your question or the issue you're experiencing? That way, I can make sure to assist you in the best possible way.
m
I have added auth username and auth password on my sip trunk for inbound calls but for some reason i am still getting spammed. Could it be because i didnt attach the trunk with dispatch rule?
t
It looks like you’ve already set up the
auth_username
and
auth_password
for your SIP trunk, which is a great first step to keep unauthorized access at bay. I understand how frustrating those spam calls can be, and I’m here to help you get this sorted out. Let’s go through a few things together to make sure your configuration is as secure as possible: • Double-check that your SIP trunk is linked to a dispatch rule. This connection is really important because without it, calls might not route correctly through your trunk. • Consider adding some extra layers of protection like
allowed_addresses
to limit calls to trusted IP ranges, and
allowed_numbers
to whitelist specific caller numbers. These can really help reduce unwanted calls. • Make sure the
auth_username
and
auth_password
exactly match what your SIP provider has set up on their end. If you’d like, I’m more than happy to walk you through setting up dispatch rules or tightening your trunk’s security even further. Just let me know, and we’ll tackle it together! Sources: SIP APIs | LiveKit Docs | livekit-protocol/livekit/protocol/sip.py | SIP outbound trunk | LiveKit Docs | lib/livekit/sip_service_client.rb | packages/sip--um-actually/src/setup-livekit.ts
m
I just checked my sip inbound trunk and dispatch rule is not available i think it got deleted why is that happening why do i keep seeing it being removed from the instance?
t
I understand how important it is to keep your SIP inbound trunks and dispatch rules intact, so I want to reassure you that these aren’t automatically deleted by the system under normal circumstances. Usually, they’re removed only if someone takes deliberate action, like using the delete APIs or manually deleting them through the admin interface. If you’re seeing these resources disappear unexpectedly, it might be due to a couple of reasons: • Perhaps another administrator or an automated script is deleting them. • There might be something going on with your account or configuration that we should look into together. To get to the bottom of this, you can check your analytics or logs for events such as
SIP_INBOUND_TRUNK_DELETED
or
SIP_DISPATCH_RULE_DELETED
. These logs will show when and how these resources were removed. Please feel free to reach out if you’d like a hand accessing or understanding these logs—I’m here to help! Sources: livekit-protocol/livekit/protocol/analytics.pyi | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | livekit/livekit_sip.twirp.go | lib/livekit/proto/livekit_sip_twirp.rb | SIP APIs | LiveKit Docs
m
I am self hosting
t
Thank you so much for sharing that you’re self-hosting. In a self-hosted setup, deleting SIP trunks or dispatch rules usually requires a deliberate action through your administrative tools or API calls. If these resources are disappearing unexpectedly, it might be due to a few reasons: • A misconfigured script or automation running on your server. • Another user with administrative access making changes. • Possible issues with your database or configuration files. To help you get to the bottom of this, I suggest: 1. Checking your server logs for any API calls or activities related to deleting SIP trunks or dispatch rules. 2. Reviewing your automation scripts or scheduled tasks to see if they might be unintentionally removing these resources. 3. Verifying your database’s integrity to rule out corruption or accidental data loss. If you’d like, I’m more than happy to guide you on where to look or how to understand the logs. Just let me know, and we can work through this together.
m
how do i add trunk id in dispatch rule ?
t
I'm happy to help you add a trunk ID to a dispatch rule! You can do this either when you're creating the rule or by updating one you already have: 1. During Dispatch Rule Creation When you're setting up a new dispatch rule, just include the
trunk_ids
field to link one or more trunk IDs. Here's a quick example:
Copy code
{
  "name": "inbound-dispatch-rule",
  "trunkIds": [
    "trunk-id-123"
  ]
}
This way, your dispatch rule will be connected to the trunk you specify. 2. Updating an Existing Dispatch Rule If you want to update a rule you already have, you can easily modify the
trunk_ids
field using the API or CLI: • CLI Command:
lk sip dispatch update --id <dispatch-rule-id> --trunks "['trunk-id-1', 'trunk-id-2']"
• API Example: Use the
UpdateSIPDispatchRule
API to add or replace trunk IDs. Please feel free to reach out if you'd like me to walk you through any specific commands or API calls tailored to your setup. I'm here to help! Sources: src/setup-livekit.ts | livekit-api/livekit/api/sip_service.py | SIP dispatch rule | LiveKit Docs | protobufs/livekit_sip.proto | src/main/kotlin/io/livekit/server/SipServiceClient.kt
m
should i be blocking spammers on my end or is that something SIP provider is responsible for ?
t
I completely understand how important it is to manage spam calls, and I’m here to help you navigate that with LiveKit. The good news is that LiveKit gives you some great tools to take control and filter incoming calls, such as: • Configuring
allowed_numbers
in inbound trunks to accept calls only from specific phone numbers. • Using
allowed_addresses
to restrict traffic to known IP ranges. • Setting up dispatch rules to route or block calls based on caller ID or destination number. While your SIP provider might have some spam protection features, LiveKit empowers you to manage call filtering and routing directly through its API and configuration options. If you’d like, I’m more than happy to guide you through setting up these filters or rules to help reduce those unwanted spam calls. Just let me know! Sources: livekit/livekit_sip.pb.go | SIP overview | LiveKit Docs
m
So when trunks and dispatch rules are deleted why was i still receiving the calls on my end ?
t
I understand it can be a bit confusing, but even after you delete SIP trunks and dispatch rules in LiveKit, calls might still come through if your SIP provider is still sending SIP INVITE requests to the LiveKit endpoint. Removing these settings in LiveKit stops call handling on your end, but it doesn’t automatically stop your SIP provider from directing traffic to your LiveKit instance. Usually, without valid trunks or dispatch rules, LiveKit will reject these calls with responses like 404 Not Found or 403 Forbidden. However, to completely stop receiving these calls, you’ll want to disable or update your SIP trunking provider’s settings so they no longer send traffic to your LiveKit endpoint. If you’d like, I’m here to help guide you through adjusting your SIP provider’s configuration to prevent any unwanted calls. Just let me know! Sources: SIP overview | LiveKit Docs | Accepting inbound calls | LiveKit Docs