aloof-account-63566
08/02/2025, 9:32 PMtall-airline-16756
08/02/2025, 9:32 PMtall-airline-16756
08/02/2025, 9:32 PMaloof-account-63566
08/02/2025, 9:33 PMtall-airline-16756
08/02/2025, 9:34 PMtransferSipParticipant method. Here’s a friendly step-by-step on how to make it happen:
1. Use the transferSipParticipant Method: This handy method lets you move a SIP participant to a different room. You’ll just need to provide:
◦ `roomName`: The name of the room where the participant is right now.
◦ `participantIdentity`: The identity of the participant you want to transfer.
◦ `transferTo`: The SIP URL or phone number where you want to send the participant. For a dynamic room, this should be the SIP endpoint of that room.
1. Example Usage: await sipClient.transferSipParticipant('current-room', participant.identity, '<sip:dynamic-room@livekit.io>');
2. Make Sure the Destination Room Exists: Double-check that the dynamic room is already created or can be created by your app. The transferTo parameter needs to point to a valid SIP endpoint for that dynamic room.
3. Permissions: Don’t forget, you’ll need the right room admin permissions to pull off this transfer smoothly.
4. Optional: Want to add a little polish? You can play a dial tone during the transfer by turning on the playDialtone option.
For even more details, feel free to check out the LiveKit SIP documentation. I’m here if you have any more questions!
Sources: packages/livekit-server-sdk/src/SipClient.ts | cmd/lk/sip.go | Transferring calls | LiveKit Docs | SIP APIs | LiveKit Docsaloof-account-63566
08/02/2025, 9:37 PMtall-airline-16756
08/02/2025, 9:38 PMsip:vjnxecm0tjk.sip.livekit.cloud), which works at the project level, not for individual rooms.
If you want a hand with setting up SIP integration or figuring out dispatch rules, just give me a shout—I’m here to help!
Sources: SIP Integration | livekit/livekit_composite | DeepWiki | SIP inbound trunk | LiveKit Docs | LiveKit Server Components | livekit/livekit_composite | DeepWiki | SIP trunk setup | LiveKit Docs | SIP overview | LiveKit Docsaloof-account-63566
08/02/2025, 9:41 PMtall-airline-16756
08/02/2025, 9:42 PM<mailto:room-name@livekit.io|room-name@livekit.io>. But good news: the TransferSIPParticipant API does let you transfer SIP participants to valid SIP URIs or phone numbers.
So, if you’re aiming to transfer a call to a specific room, you’ll want to make sure the destination is a valid SIP endpoint. One way to do this is by setting up dispatch rules that can dynamically route calls to the rooms you want. Another option is using the transfer_to parameter to point to a valid SIP URI that matches your target room.
If you’d like a hand setting up those dispatch rules or want to chat about other ways to make this work, just give me a shout—I’m here to help!
Sources: SIP overview | LiveKit Docs | packages/livekit-server-sdk/src/SipClient.ts | livekit/livekit_sip.pb.go | test/integration/sip_test.goaloof-account-63566
08/02/2025, 9:43 PMtall-airline-16756
08/02/2025, 9:44 PMTransferSIPParticipant API and provide a valid SIP URI as the transfer_to parameter. Here are some examples of valid SIP URI formats to give you an idea:
• tel:+15105550100 (telephone number)
• <sip:+15105550100@sip.telnyx>.com (SIP URI)
• <sip:+15105550100@my-livekit-demo.pstn>.twilio.com (SIP URI)
Here’s a quick example of how you might transfer a participant:
await sipClient.transferSipParticipant('current-room', participant.identity, '<sip:+15105550100@sip.telnyx>.com');
If you’d like a hand setting up a SIP URI for a specific room or have any questions, just let me know—I’m here to help!
Sources: Transferring calls | LiveKit Docsaloof-account-63566
08/04/2025, 12:12 AMtall-airline-16756
08/04/2025, 12:12 AMlk sip inbound create inbound-trunk.json
2. Create a Dispatch Rule: This helps route calls to the right rooms. You’ve got a couple of options here: Then just use this CLI command: lk sip dispatch create dispatch-rule.json
◦ Direct Room Assignment: {
"dispatch_rule": {
"rule": {
"dispatchRuleDirect": {
"roomName": "specific-room"
}
}
}
}
◦ Dynamic Room Creation with Prefix: {
"dispatch_rule": {
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "meeting-"
}
}
}
}
1. Optional: You can add a PIN for extra room security or link agents to handle incoming calls if that fits your setup.
If you want to dive deeper, check out the LiveKit SIP documentation. And hey, if you have any questions or need a hand, just let me know—I’m here to help!aloof-account-63566
08/04/2025, 12:16 AMdispatchRuleIndividual . I want each caller to have their own room. So should I update the trunk when every single call comes in to add the phone number?tall-airline-16756
08/04/2025, 12:17 AMdispatchRuleIndividual. This handy rule takes care of creating a new room for each caller based on their phone number, plus it adds an optional prefix and a random suffix to keep things unique.
For example, if your dispatch rule looks like this:
{
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"name": "My dispatch rule"
}
When a call comes in from +15551234567, LiveKit will automatically spin up a room named something like call-+15551234567-abc123 (that random suffix keeps things fresh!). It pulls the phone number right from the SIP call headers, so you don’t have to worry about manually updating the trunk.
If you’d like a hand setting this up or have any questions, just let me know—I’m here to help!
Sources: SIP dispatch rule | LiveKit Docs | sip/sip_test.goaloof-account-63566
08/04/2025, 12:22 AMtall-airline-16756
08/04/2025, 12:22 AM<sip:call-+15551234567-abc123@agentperformancedev-362y4m63.liveki>t.cloud, isn’t quite matching the standard SIP URI format that LiveKit expects for the transfer_to parameter.
No worries though! Here’s a quick rundown of the correct format:
• Standard SIP URI: sip:user@host, where host is the SIP server domain or IP address.
• Telephone Numbers: Use the tel: scheme with the E.164 format, like tel:+15551234567.
Here are some examples that should work well:
• tel:+15551234567
• <sip:+15551234567@sip.exampl>e.com
• <sip:user@sip.liveki>t.cloud
If you’re trying to transfer to an internal LiveKit SIP participant, just double-check that you’re using the right SIP URI format along with the correct authentication and trunk setup. And of course, if you want me to walk you through it or have any other questions, I’m here to help!
Sources: Transferring calls | LiveKit Docsaloof-account-63566
08/04/2025, 12:25 AMtall-airline-16756
08/04/2025, 12:26 AMsbx-j4ktb7-Z58cQnzH3kaGKjynXTQ7sh@agentperformancedev-362y4m63.livekit.cloud, can definitely be used with the transfer_sip_participant function. Just a quick tip: it needs to be formatted as a proper SIP URI by adding the sip: prefix.
Here’s how it should look:
<sip:sbx-j4ktb7-Z58cQnzH3kaGKjynXTQ7sh@agentperformancedev-362y4m63.liveki>t.cloud
And here’s an example of how you’d use it:
const transferTo = "<sip:sbx-j4ktb7-Z58cQnzH3kaGKjynXTQ7sh@agentperformancedev-362y4m63.liveki>t.cloud";
await sipClient.transferSipParticipant('room-name', 'participant-identity', transferTo);
Just a heads up—make sure your SIP provider trunks are set up to allow call transfers so everything goes smoothly. If you hit any snags or have more questions, I’m here to help!
Sources: livekit-agents/livekit/agents/job.py | Transferring calls | LiveKit Docsaloof-account-63566
08/04/2025, 12:32 AMtall-airline-16756
08/04/2025, 12:33 AMcall transfer failed, status=408 means that the SIP request timed out during the transfer process. This usually happens when the transfer destination doesn’t respond in time or can’t be reached.
Here are some friendly steps to help you fix this:
1. Increase the Timeout: Try setting a longer timeout for the transfer using the ringing_timeout parameter. For example: transfer_request = proto_sip.TransferSIPParticipantRequest(
participant_identity=participant_identity,
room_name=room_name,
transfer_to=transfer_to,
play_dialtone=True,
ringing_timeout=duration_pb2.Duration(seconds=30) # Increase timeout
)
2. Double-Check the Transfer Destination: Make sure the destination is:
◦ A valid and reachable SIP URI or phone number
◦ Formatted correctly (like sip:user@host or tel:+1234567890)
◦ Not busy or set to do-not-disturb
◦ Ready to accept incoming calls
1. Check Your Network Connection: Confirm that:
◦ Your SIP trunk can connect properly to the destination
◦ No firewalls or network issues are blocking SIP traffic
◦ Your SIP provider supports REFER requests needed for transfers
1. Keep an Eye on Transfer Status: Use error handling to smoothly manage any transfer hiccups and keep your users informed.
If you want, I’m here to help you walk through any of these steps—just let me know!
Sources: protobufs/livekit_sip.proto | pkg/sip/inbound.goaloof-account-63566
08/04/2025, 12:38 AMtall-airline-16756
08/04/2025, 12:39 AMtwilio api trunking v1 trunks update --sid <twilio-trunk-sid> \
--transfer-mode enable-all \
--transfer-caller-id from-transferee
2. Timeout Configuration: Transfers usually time out after 30 seconds by default. If your SIP provider takes longer to handle the transfer, make sure the transfer destination is reachable and responds promptly. It’s also a good idea to check if your SIP provider has any specific timeout settings.
3. Transfer Destination Issues: Check that the transfer_to value is:
◦ Formatted correctly (for example, sip:room-name@host)
◦ Reachable and set up to accept incoming calls
1. Test with a Simple Destination: Try transferring to a phone number or SIP URI that you know works. This can help narrow down where the problem might be.
2. Network Connectivity: Make sure there aren’t any network hiccups between LiveKit and your SIP provider, and that the SIP REFER method is supported and configured correctly.
If you want, I’m here to help walk you through any of these steps—just let me know!
Sources: protobufs/livekit_sip.proto | Transferring calls | LiveKit Docs | pkg/service/sip.go