Skip to content

Commit 65d1614

Browse files
committed
Fix SIP trunk host name in tests and update attribute comments
1 parent a4f2591 commit 65d1614

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

livekit/attrs.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const (
1212
AttrSIPDispatchRuleID = AttrSIPPrefix + "ruleID"
1313
// AttrSIPTrunkNumber attribute contains number associate with LiveKit SIP Trunk.
1414
// This attribute will be omitted if HidePhoneNumber is set.
15-
AttrSIPTrunkNumber = AttrSIPPrefix + "trunkPhoneNumber"
15+
AttrSIPTrunkNumber = AttrSIPPrefix + "trunkPhoneNumber"
16+
// AttrSIPTrunkHostName attribute contains host name associate with LiveKit SIP Trunk.
17+
// This attribute will be omitted if HidePhoneNumber is set.
1618
AttrSIPTrunkHostName = AttrSIPPrefix + "trunkHostName"
1719
// AttrSIPPhoneNumber attribute contains number external to LiveKit SIP (caller for inbound and called number for outbound).
1820
// This attribute will be omitted if HidePhoneNumber is set.

rpc/sip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestNewCreateSIPParticipantRequest(t *testing.T) {
6161
livekit.AttrSIPCallID: "call-id",
6262
livekit.AttrSIPTrunkID: "trunk",
6363
livekit.AttrSIPTrunkNumber: "+1111",
64-
livekit.AttrSIPTrunkHostName: "sip2.example.com",
64+
livekit.AttrSIPTrunkHostName: "xyz.sip.livekit.cloud",
6565
livekit.AttrSIPPhoneNumber: "+3333",
6666
livekit.AttrSIPHostName: "sip.example.com",
6767
},

sip/sip_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,11 +649,14 @@ func TestEvaluateDispatchRule(t *testing.T) {
649649
CallingNumber: "+11112222",
650650
CallingHost: "sip.example.com",
651651
CalledNumber: "+3333",
652+
CalledHost: "sip2.example.com",
652653
ExtraAttributes: map[string]string{
653654
"prov-attr": "1",
654655
},
655656
}
656-
tr := &livekit.SIPInboundTrunkInfo{SipTrunkId: "trunk"}
657+
tr := &livekit.SIPInboundTrunkInfo{
658+
SipTrunkId: "trunk",
659+
}
657660
res, err := EvaluateDispatchRule("p_123", tr, d, r)
658661
require.NoError(t, err)
659662
require.Equal(t, &rpc.EvaluateSIPDispatchRulesResponse{

0 commit comments

Comments
 (0)