Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/many-seas-fry.md

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# github.com/livekit/protocol

## 1.45.6

### Patch Changes

- Add turn detection protobufs - [#1485](https://github.com/livekit/protocol/pull/1485) ([@chenghao-mou](https://github.com/chenghao-mou))

- fix change set for eot changes - [#1515](https://github.com/livekit/protocol/pull/1515) ([@chenghao-mou](https://github.com/chenghao-mou))

## 1.45.5

## 1.45.4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "github.com/livekit/protocol",
"private": true,
"version": "1.45.5",
"version": "1.45.6",
"scripts": {
"changeset": "changeset",
"ci:publish": "pnpm --filter @livekit/protocol run build && changeset publish"
Expand Down
2 changes: 2 additions & 0 deletions packages/javascript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @livekit/protocol

## 1.45.6

## 1.45.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@livekit/protocol",
"version": "1.45.5",
"version": "1.45.6",
"description": "",
"type": "module",
"require": "dist/index.cjs",
Expand Down
3 changes: 2 additions & 1 deletion sip/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ func MatchTrunkDetailed(it iters.Iter[*livekit.SIPInboundTrunkInfo], call *rpc.S
result.MatchType = TrunkMatchSpecific
return result, nil
}
// Keep searching! We want to know if there are any conflicting Trunk definitions.
// A trunk matches at most once per call; remaining numbers on this trunk cannot change the decision.
break
} else {
opt.Filtered(tr, TrunkFilteredCalledNumberDisallowed)
}
Expand Down
26 changes: 26 additions & 0 deletions sip/sip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,32 @@ func TestSIPMatchTrunk(t *testing.T) {
}
}

// TestSIPMatchTrunkSameTrunkDuplicateNumberForms verifies that a trunk listing
// the same number in both +E.164 and bare forms is not treated as a conflict
// with itself. Regression test for "Multiple SIP Trunks matched" when a user
// configures both "+19793169351" and "19793169351" on one trunk.
func TestSIPMatchTrunkSameTrunkDuplicateNumberForms(t *testing.T) {
trunks := []*livekit.SIPInboundTrunkInfo{
{SipTrunkId: "aaa", Numbers: []string{"+" + sipNumber2, sipNumber2}},
}
for _, toNum := range []string{sipNumber2, "+" + sipNumber2} {
t.Run("to="+toNum, func(t *testing.T) {
call := &rpc.SIPCall{
SipCallId: "test-call-id",
SourceIp: "1.1.1.1",
From: &livekit.SIPUri{User: sipNumber1, Host: "sip.example.com"},
To: &livekit.SIPUri{User: toNum},
}
call.Address = call.To
got, err := MatchTrunkIter(iters.Slice(trunks), call, WithTrunkConflict(func(t1, t2 *livekit.SIPInboundTrunkInfo, reason TrunkConflictReason) {
t.Fatalf("unexpected conflict: %v\n%v\nvs\n%v", reason, t1, t2)
}))
require.NoError(t, err)
require.Equal(t, trunks[0], got)
})
}
}

func TestSIPValidateTrunks(t *testing.T) {
for _, c := range trunkCases {
c := c
Expand Down