powersmybizcode@instance-20251031-113624:~$ lk sip...
# ask-ai
r
powersmybizcode@instance-20251031-113624:~$ lk sip dispatch list Using api-key, api-secret from environment ┌───────────────────┬──────┬───────────┬──────┬──────────┬─────┬────────────┬────────┐ │ SipDispatchRuleID │ Name │ SipTrunks │ Type │ RoomName │ Pin │ Attributes │ Agents │ ├───────────────────┼──────┼───────────┼──────┼──────────┼─────┼────────────┼────────┤ └───────────────────┴──────┴───────────┴──────┴──────────┴─────┴────────────┴────────┘ powersmybizcode@instance-20251031-113624:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b7f2d60e25c9 livekit/sip "livekit-sip --confi…" 3 days ago Up 3 days powersmybizcode-sip-1 c108861b7d25 livekit/livekit-server:master "/livekit-server --d…" 3 days ago Up 3 days powersmybizcode-livekit-1 7be635b175eb redis:7 "docker-entrypoint.s…" 3 days ago Up 3 days (healthy) powersmybizcode-redis-1 993ae875161b livekit/caddyl4:latest "/bin/caddy run --co…" 3 days ago Up 3 days powersmybizcode-caddy-1 powersmybizcode@instance-20251031-113624:~$ lk sip trunk list No help topic for 'trunk' powersmybizcode@instance-20251031-113624:~$ lk sip inbound list Using api-key, api-secret from environment ┌────────────┬──────┬─────────┬──────────────────┬────────────────┬────────────────┬────────────┬─────────┬──────────┐ │ SipTrunkID │ Name │ Numbers │ AllowedAddresses │ AllowedNumbers │ Authentication │ Encryption │ Headers │ Metadata │ ├────────────┼──────┼─────────┼──────────────────┼────────────────┼────────────────┼────────────┼─────────┼──────────┤ └────────────┴──────┴─────────┴──────────────────┴────────────────┴────────────────┴────────────┴─────────┴──────────┘ powersmybizcode@instance-20251031-113624:~$ I have self hosted livekit sip and livekit server redis and caddy14 using the docker file. now after 3 days these inbound trunk and dispatch rule is being deleted i don't know why
t
Thanks for reaching out, Rahul. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how concerning it can be to see your inbound trunks and dispatch rules disappearing after just 3 days. I want to reassure you that this automatic deletion is not a typical behavior of LiveKit. Often, this kind of issue can stem from other factors like: • Custom scripts or automation in your setup that might be removing these resources without you realizing it • Infrastructure as code (IaC) tools that could be reapplying configurations and causing deletions • Scheduled manual cleanup processes that run periodically To help get to the bottom of this, here are a few steps you might consider: 1. Take a look at any custom automation scripts or deployment pipelines you have running in your environment. 2. Check if any infrastructure provisioning tools (such as Terraform, Ansible, etc.) might be managing these resources and potentially deleting them. 3. Review your logs for any API calls to
DeleteSIPTrunk
or
DeleteSIPDispatchRule
to see if they provide any clues. Please don’t hesitate to reach out if you’d like me to walk through these steps together or if you have any other questions. I’m here to help! Sources: SIP APIs | LiveKit Docs | SIP Integration & Telephony | livekit/livekit_composite | DeepWiki | src/setup-livekit.ts | packages/sip--um-actually/src/setup-livekit.ts
r
how should I start for debugging
t
Let's work together to debug the automatic deletion of SIP trunks and dispatch rules with these friendly steps: 1. Monitor API Deletion Calls: Try adding logging around the deletion API endpoints like
DeleteSIPTrunk
and
DeleteSIPDispatchRule
. This way, you can see exactly when and why these deletions happen. 2. Audit CLI Usage: It’s a good idea to regularly run commands such as
lk sip inbound list
and
lk sip dispatch list
to take snapshots of your SIP configuration. Also, checking the shell history for any deletion commands can be really insightful. 3. Set Up API Endpoint Monitoring: Keep an eye on HTTP requests to endpoints like
/twirp/livekit.SIP/DeleteSIPTrunk
and
/twirp/livekit.SIP/DeleteSIPDispatchRule
at your load balancer or API gateway. This helps catch any unexpected calls. 4. Use List APIs for Auditing: Periodically calling APIs such as
ListSIPInboundTrunk
and
ListSIPDispatchRule
allows you to compare your current setup with previous snapshots and spot any differences. 5. Validate Before Deletion: Adding pre-deletion checks in your code to confirm the resource exists before deleting can prevent accidental removals. Following these steps should help pinpoint if the deletions are coming from external automation, CI/CD pipelines, or other processes in your environment. If you'd like, I’m here to help you dive deeper into any of these steps—just let me know! Sources: livekit-api/livekit/api/sip_service.py | src/main/kotlin/io/livekit/server/SipServiceClient.kt | cmd/lk/sip.go | pkg/sip/inbound.go | sip/sip.go
r
is there any way I can review the logs to like when it was created when it was deleted
t
Thanks for reaching out! Just to make sure I’m pointing you in the right direction, could you please clarify a couple of things? • Are you interested in operational logs, like system-level logs for debugging, or audit logs that track actions like who created or deleted resources? • Also, are you using LiveKit Cloud or do you have a self-hosted LiveKit setup? Once I have this info, I’ll be able to guide you through reviewing the right logs. Looking forward to helping you! Sources: cmd/lk/sip.go | protobufs/livekit_sip.proto | SIP APIs | LiveKit Docs
r
yes self hosted
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
r
there is no logging done to check when was the rule created and when was it deleted cannot i trace it ?
?