From ec2dff96a3b7903b8efe9549d01919db0f70f31e Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Tue, 8 Apr 2025 17:39:16 +0300 Subject: [PATCH] Fix SIP updates when replacing slices. (#3592) --- go.mod | 2 +- go.sum | 4 ++-- pkg/service/sip.go | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 5ef0d52a2..be61439bf 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/jxskiss/base62 v1.1.0 github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 github.com/livekit/mediatransportutil v0.0.0-20250310153736-45596af895b6 - github.com/livekit/protocol v1.36.2-0.20250407181517-218e13187ea5 + github.com/livekit/protocol v1.36.2-0.20250408143132-c193b8d080da github.com/livekit/psrpc v0.6.1-0.20250205181828-a0beed2e4126 github.com/mackerelio/go-osstat v0.2.5 github.com/magefile/mage v1.15.0 diff --git a/go.sum b/go.sum index 923675cf3..46b213e6a 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20250310153736-45596af895b6 h1:6ZhtnY9I9knfm3ieIPpznQSEU2rDECO8yliW/ANLQ7U= github.com/livekit/mediatransportutil v0.0.0-20250310153736-45596af895b6/go.mod h1:36s+wwmU3O40IAhE+MjBWP3W71QRiEE9SfooSBvtBqY= -github.com/livekit/protocol v1.36.2-0.20250407181517-218e13187ea5 h1:KZMliZp8+f55amV7zNYmRjKN9wZ3/JYcBZsCyaGz/D8= -github.com/livekit/protocol v1.36.2-0.20250407181517-218e13187ea5/go.mod h1:WrT/CYRxtMNOVUjnIPm5OjWtEkmreffTeE1PRZwlRg4= +github.com/livekit/protocol v1.36.2-0.20250408143132-c193b8d080da h1:KZ2almsG7lNk0/4FhpLEuX5JOq5QVh8eCVhfsf4821M= +github.com/livekit/protocol v1.36.2-0.20250408143132-c193b8d080da/go.mod h1:WrT/CYRxtMNOVUjnIPm5OjWtEkmreffTeE1PRZwlRg4= github.com/livekit/psrpc v0.6.1-0.20250205181828-a0beed2e4126 h1:fzuYpAQbCid7ySPpQWWePfQOWUrs8x6dJ0T3Wl07n+Y= github.com/livekit/psrpc v0.6.1-0.20250205181828-a0beed2e4126/go.mod h1:X5WtEZ7OnEs72Fi5/J+i0on3964F1aynQpCalcgMqRo= github.com/mackerelio/go-osstat v0.2.5 h1:+MqTbZUhoIt4m8qzkVoXUJg1EuifwlAJSk4Yl2GXh+o= diff --git a/pkg/service/sip.go b/pkg/service/sip.go index a2d8f4588..ac7b832c5 100644 --- a/pkg/service/sip.go +++ b/pkg/service/sip.go @@ -198,7 +198,8 @@ func (s *SIPService) UpdateSIPInboundTrunk(ctx context.Context, req *livekit.Upd default: return nil, errors.New("missing or unsupported action") case livekit.UpdateSIPInboundTrunkRequestAction: - if err = a.Apply(info); err != nil { + info, err = a.Apply(info) + if err != nil { return nil, err } } @@ -248,7 +249,8 @@ func (s *SIPService) UpdateSIPOutboundTrunk(ctx context.Context, req *livekit.Up default: return nil, errors.New("missing or unsupported action") case livekit.UpdateSIPOutboundTrunkRequestAction: - if err = a.Apply(info); err != nil { + info, err = a.Apply(info) + if err != nil { return nil, err } } @@ -464,7 +466,8 @@ func (s *SIPService) UpdateSIPDispatchRule(ctx context.Context, req *livekit.Upd default: return nil, errors.New("missing or unsupported action") case livekit.UpdateSIPDispatchRuleRequestAction: - if err = a.Apply(info); err != nil { + info, err = a.Apply(info) + if err != nil { return nil, err } }