I want user to be able to buy phone numbers from t...
# ask-ai
f
I want user to be able to buy phone numbers from twilio/telnyx. However livekit forces me to specify the exact phone numbers when I create an inbound trunk. How do I solve this problem ?
t
Thanks for reaching out, Dmitry. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
When setting up inbound trunks with LiveKit, it's important to specify the exact phone numbers you want to use. The
numbers
field in the
SIPInboundTrunkInfo
should include an array of those specific phone numbers that the trunk will accept calls for. I understand this might feel a bit restrictive since there isn't an option to configure an inbound trunk without listing these exact numbers. If you have a particular use case or need a hand figuring things out, please don’t hesitate to reach out. I’m here to help and we can definitely explore some workarounds or alternative solutions together. Sources: livekit/livekit_sip.pb.go | SIP inbound trunk | LiveKit Docs | SIP APIs | LiveKit Docs
f
when I tried to remove numbers manually from trunk json , i received the following error : Trunk update failed: [internal] twirp error unknown: for security, one of the fields must be set: AuthUsername+AuthPassword, AllowedAddresses or Numbers
t
Hi there! It looks like this error happens because LiveKit requires at least one security measure when updating a SIP inbound trunk. To help you get past this, you’ll need to set up at least one of the following: • AuthUsername and AuthPassword: These are the credentials used to authenticate inbound SIP invites. • AllowedAddresses: This is a list of IP addresses or CIDR blocks from which traffic will be accepted. • Numbers: These are the phone numbers associated with the trunk that will accept calls. This check is in place to make sure your inbound trunks stay secure. So, if you’d like to remove the
numbers
field, just make sure to configure either
AuthUsername+AuthPassword
or
AllowedAddresses
to keep everything safe and sound. Sources: livekit/livekit_sip.pb.go | SIP APIs | LiveKit Docs
f
where do I get auth username and auth password in telnyx? I tried using the same login and password as my SIP configuration but getting this error
t
To set up
AuthUsername
and
AuthPassword
for your Telnyx SIP trunk in LiveKit, you’ll want to use the SIP credentials that Telnyx provides. These are a bit different from your usual Telnyx account login details—they’re specially made for your SIP connection. Here’s a simple way to find and use them: 1. First, log in to your Telnyx account and head over to the Connections section. 2. Next, find or create a Credential-Based Connection. This will give you a username and password just for SIP authentication. 3. Then, enter these credentials into your LiveKit trunk setup under the
auth_username
and
auth_password
fields. If you’re still running into any issues, double-check that the SIP signaling address in your trunk configuration matches the regional address Telnyx suggests (like
<http://sip.telnyx.com|sip.telnyx.com>
for the US). Please feel free to reach out if you’d like me to walk you through any part of this—I’m here to help! Sources: SIP outbound trunk | LiveKit Docs | cmd/lk/sip.go | Create and configure Telnyx SIP trunk | LiveKit Docs
f
@refined-appointment-81829 plshelp! can't find a solution to my problem using help. What's the recommended approach for my scenario https://livekit-users.slack.com/archives/C088ZNU7QQ5/p1758797929768539
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!