adventurous-area-21680
02/14/2025, 2:35 PMgray-monkey-83525
02/14/2025, 2:35 PMheaders_to_attributes
field in your trunk.json
configuration. Here's an example:
{
"trunk": {
"name": "Example Inbound Trunk",
"numbers": [
"+15105550100"
],
"headers_to_attributes": {
"X-Custom-Header1": "custom_attribute1",
"X-Custom-Header2": "custom_attribute2"
}
}
}
This configuration maps the SIP headers X-Custom-Header1
and X-Custom-Header2
to the participant attributes custom_attribute1
and custom_attribute2
, respectively. You can create the trunk using the LiveKit CLI with the command lk sip inbound create trunk.json
.
Would you like more details on this setup?
Sources:
- CreateSIPInboundTrunk š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.adventurous-area-21680
02/14/2025, 2:40 PMgray-monkey-83525
02/14/2025, 2:40 PMheaders_to_attributes
field is not recognized in your trunk.json
configuration. This could be due to using an outdated version of the LiveKit CLI or server that does not support this field.
To resolve this issue, ensure that you are using the latest version of the LiveKit CLI and server. You can check for updates or refer to the LiveKit documentation to confirm the availability of the headers_to_attributes
feature.
Would you like more detailed guidance on updating your setup or troubleshooting this issue further?
Sources:
- CreateSIPInboundTrunk š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.adventurous-area-21680
02/14/2025, 2:50 PMgray-monkey-83525
02/14/2025, 2:50 PMheaders_to_attributes
mapping should be set within the inbound trunk configuration, as it is specifically used to map SIP X-* headers to participant attributes when a call is processed through that trunk. This mapping is not typically set in dispatch rules, which are used to control how calls are routed to rooms and manage other call handling logic.
If you need to set custom attributes or metadata for participants based on dispatch rules, you can do so using the attributes
or metadata
fields in the dispatch rule configuration. However, these are separate from the SIP header mappings.
Would you like more details on configuring dispatch rules or any other aspect of your setup?
Sources:
- CreateSIPInboundTrunk š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.adventurous-area-21680
02/14/2025, 2:54 PMgray-monkey-83525
02/14/2025, 2:54 PMheaders_to_attributes
mapping correctly in your inbound trunk configuration, but the attributes are not appearing in the RemoteParticipant
attributes. Here are a few things to check and consider:
1. Header Format: Ensure that the SIP headers are being sent correctly from your SIP client (e.g., MicroSIP). The header should be included in the SIP INVITE request. You can verify this by checking the SIP logs or using a tool like Wireshark to capture and inspect the SIP traffic.
2. Trunk Configuration: Double-check that the headers_to_attributes
mapping is correctly configured in your trunk. The mapping should be in the format "X-test": "custom_attribute_1"
, as you've shown.
3. LiveKit Version: Ensure that your LiveKit server and CLI are up-to-date and support the headers_to_attributes
feature. This feature might not be available in older versions.
4. Participant Attributes: After the call is connected, check the participant attributes using the LiveKit SDK or API to ensure they are being populated. You can use the RoomService.UpdateParticipant
API to fetch participant details and verify the attributes.
Would you like more detailed guidance on any of these steps?
Sources:
- https://docs.livekit.io/sip/sip-participant/
- https://docs.livekit.io/sip/api/#SIPDispatchRuleInfo š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.adventurous-area-21680
02/17/2025, 10:16 AMgray-monkey-83525
02/17/2025, 10:16 AMheaders_to_attributes
is a relatively recent addition to LiveKit. Unfortunately, the specific version in which this feature was introduced is not explicitly mentioned in the provided data sources.
To determine the exact version, you might want to check the release notes or changelogs of the LiveKit SIP server on their GitHub repository or contact LiveKit support for detailed version history.
Would you like more guidance on how to find this information or any other assistance?
Sources:
- https://docs.livekit.io/server-sdk-js/interfaces/CreateSipOutboundTrunkOptions.html š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.adventurous-area-21680
02/17/2025, 12:00 PMgray-monkey-83525
02/17/2025, 12:00 PMupdate
command for room participants. Here's a general approach:
1. Use the update
Command: You can update a participant's attributes by specifying the room name, participant identity, and the attributes you want to set.
2. Command Example:
lk room participants update --attributes '{"test":"value_test"}' --room <room_name> <participant_identity>
Replace <room_name>
with the name of your room and <participant_identity>
with the identity of the participant you want to update.
Would you like more detailed guidance on using the LiveKit CLI or any other aspect of participant management?
Sources:
- Managing participants | LiveKit Docs š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.adventurous-area-21680
02/17/2025, 1:42 PMgray-monkey-83525
02/17/2025, 1:42 PMheaders_to_attributes
field in your dispatchRule.json
configuration. Here's an example:
{
"name": "Example Dispatch Rule",
"trunk_ids": [
"<your-trunk-id>"
],
"rule": {
"dispatchRuleDirect": {
"roomName": "example-room",
"pin": ""
}
},
"headers_to_attributes": {
"X-Custom-Header1": "custom_attribute1",
"X-Custom-Header2": "custom_attribute2"
}
}
In this configuration:
- Replace <your-trunk-id>
with the ID of your SIP trunk.
- The headers_to_attributes
field maps SIP headers X-Custom-Header1
and X-Custom-Header2
to participant attributes custom_attribute1
and custom_attribute2
.
You can create the dispatch rule using the LiveKit CLI with the command lk sip dispatch create dispatchRule.json
.
Would you like more details on this setup?
Sources:
- https://docs.livekit.io/sip/api/#CreateSIPInboundTrunk
- https://docs.livekit.io/sip/sip-participant/ š 0 button š 0 button š” Hint: Mention @runllm in the thread for followups.