Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for key/value attributes on Participant #733

Merged
merged 14 commits into from
Jun 20, 2024
14 changes: 7 additions & 7 deletions infra/link.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions livekit/attrs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package livekit

// Names of participant attributes for SIP.
const (
// AttrSIPPrefix is shared for all SIP attributes.
AttrSIPPrefix = "lk.sip."
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think the lk. namespace adds value here? IMO since we don't have any reserved namespace, it could just be tagged SIP?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for us not wanting a reserved namespace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mechanism for us to set these attributes is via token grants, we do not have a way to enforce that a particular component is SIP vs something else. Since the developer is responsible for issuing tokens, they should be "trusting" information that they are providing.

// AttrSIPCallID attribute contains LiveKit SIP call ID.
AttrSIPCallID = AttrSIPPrefix + "callID"
// AttrSIPTrunkID attribute contains LiveKit SIP Trunk ID used for the call.
AttrSIPTrunkID = AttrSIPPrefix + "trunkID"
// AttrSIPDispatchRuleID attribute contains LiveKit SIP DispatchRule ID used for the inbound call.
AttrSIPDispatchRuleID = AttrSIPPrefix + "ruleID"
// AttrSIPFromNumber attribute contains number from which the call was made.
// This attribute will be omitted if HidePhoneNumber is set.
AttrSIPFromNumber = AttrSIPPrefix + "fromNumber"
davidzhao marked this conversation as resolved.
Show resolved Hide resolved
// AttrSIPToNumber attribute contains number to which the call was made.
// This attribute will be omitted if HidePhoneNumber is set.
AttrSIPToNumber = AttrSIPPrefix + "toNumber"
)
50 changes: 25 additions & 25 deletions livekit/livekit_agent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions livekit/livekit_analytics.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading