To connect to your own SIP trunk in LiveKit, follow these steps:
1. External Provider Setup:
• Create a SIP trunk with your provider and configure authentication or IP restrictions.
• Purchase a phone number and associate it with your SIP trunk.
• Add your LiveKit SIP URI to the SIP trunk. You can find your SIP URI on the Project settings page.
2. LiveKit Setup:
• Create an inbound trunk using the LiveKit Cloud dashboard or programmatically. For example, use the JSON editor to define the trunk and include your purchased phone number.
• Set up a dispatch rule to route incoming calls to a LiveKit room.
• For outbound calls, create an outbound trunk and specify your provider's SIP server details, including authentication credentials if required.
Would you like detailed instructions for any specific step, such as configuring authentication, dispatch rules, or advanced settings?
Sources:
Create and configure SIP trunk | LiveKit Docs |
SIP trunk setup | LiveKit Docs |
packages/livekit-server-sdk/src/SipClient.ts |
protobufs/livekit_sip.proto