How do you ensure the outbound trunk is enabled an...
# ask-ai
g
How do you ensure the outbound trunk is enabled and making SIP calls?
t
Thanks for reaching out, Snehaal. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Let's make sure your outbound trunk is up and running for SIP calls! Here's a simple step-by-step guide to help you out: 1. Create and Configure the Trunk: Start by using the
CreateSIPOutboundTrunk
API to set up your trunk. You'll need to provide details like the
address
(hostname or IP),
numbers
(the phone numbers you'll be calling from), and your authentication info (
auth_username
and
auth_password
). 2. Verify Configuration: Next, double-check everything with the
ListSIPOutboundTrunk
API. This will show you the trunk details and give you the trunk ID. 3. Test Calls: Ready to try it out? Use the
CreateSIPParticipant
API to make outbound calls. This sends an INVITE to your SIP provider, who'll verify the credentials and connect the call if all looks good. 4. Monitor Call Status: Keep an eye on how your call is doing by listening for participant events. For example, when the call connects, the
sip.callStatus
will update to
active
. 5. Troubleshoot Issues: If something doesn’t work, no worries! Check your authentication details, provider setup, phone number settings, and the transport protocol (like UDP, TCP, or TLS). There are also some cool advanced options like wildcard numbers, region pinning, or media encryption if you want to explore further. Just give me a shout if you’d like a hand with any of these steps! Sources: Making outbound calls | LiveKit Docs | SIP outbound trunk | LiveKit Docs | SIP outbound trunk | LiveKit Docs | protobufs/livekit_sip.proto