late-helmet-58096
09/19/2025, 8:15 AMtall-airline-16756
09/19/2025, 8:15 AMtall-airline-16756
09/19/2025, 8:16 AMCreateSIPParticipant API to kick off the call. You’ll need to prepare a JSON file (for example, sip-participant.json) with some key details like your SIP trunk ID, the phone number you want to dial (sip_call_to), the target room name (room_name), and participant info. Here’s a sample JSON to guide you:
{
"sip_trunk_id": "<your-trunk-id>",
"sip_call_to": "<phone-number-to-dial>",
"room_name": "my-sip-room",
"participant_identity": "sip-test",
"participant_name": "Test Caller",
"krisp_enabled": true,
"wait_until_answered": true
}
3. Run the Command: Now, use the LiveKit CLI to create the SIP participant and start the call:
`lk sip participant create sip-participant.json`Just a heads-up: when you set wait_until_answered to true, the command will patiently wait until the call is answered.
4. Another Option: Use SDKs: If you prefer coding, you can also use server SDKs like Python or Node.js to create a SIP participant programmatically. Here’s a quick example in Python:
response = await livekit_api.sip.create_sip_participant(
api.CreateSIPParticipantRequest(
sip_trunk_id="your-trunk-id",
sip_call_to="phone-number",
room_name="my-sip-room",
participant_identity="sip-participant"
)
)
Following these steps will help you connect an external phone call as a SIP participant to your custom LiveKit room, making telephony integration smooth and straightforward. If you have any questions along the way, feel free to ask—I'm here to help!
Sources: Make outbound calls | LiveKit Docs | ivr-nagivator/flask_livekit/extension.pylate-helmet-58096
09/19/2025, 8:39 AMtall-airline-16756
09/19/2025, 8:39 AMsip:<room_name>@xxxx.sip.livekit.cloud are thoughtfully designed to work smoothly with standard SIP systems, including Asterisk. To make sure I can assist you in the best way possible, could you please share a bit more about your situation?
• Are you aiming to route calls from Asterisk into LiveKit rooms, or the other way around?
• Would you like some help setting up the SIP trunk on either LiveKit or Asterisk?
I’m here to help, so just let me know, and we’ll get this sorted out together!
Sources: SIP overview | LiveKit Docs | SIP Integration | livekit/livekit_composite | DeepWiki | LiveKit SDKs Overview | LiveKit Docs | SIP trunk setup | LiveKit Docs | protobufs/livekit_sip.protolate-helmet-58096
09/19/2025, 8:44 AMtall-airline-16756
09/19/2025, 8:45 AMCreateSIPTrunk API or the LiveKit CLI to set this up. Here's an example configuration to guide you:
{
"inbound_addresses": [
"192.0.2.0/24"
],
"inbound_numbers_regex": ".*",
"inbound_username": "user",
"inbound_password": "pass"
}
2. Create a SIP Dispatch Rule: Next, define how incoming calls will be routed to your custom room. Using the dispatchRuleDirect lets you send calls straight to a specific room name. Here's an example dispatch rule:
`{
"rule": {
"dispatchRuleDirect": {
"roomName": "my-custom-room"
}
}
}`Feel free to add a PIN if you'd like to add an extra layer of access control.
3. Ensure Service Connectivity: It's important to check that the LiveKit SIP service can communicate smoothly with your LiveKit server via Redis, and that it has a public IP address reachable by SIP peers.
4. Optional Customization: If you'd like, you can attach custom metadata and attributes to the SIP participant. This can help with identification or integrating with other services.
By following these steps, you'll have a SIP gateway set up for your custom room, making it easy for telephony systems to connect seamlessly. If you have any questions along the way, I’m here to help!
Sources: test/lktest-sip-outbound/main.go | SIP dispatch rule | LiveKit Docs | ivr-nagivator/flask_livekit/extension.py