From cf7a88e17c9b07bd4718763046b2037575d6ee07 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Tue, 7 May 2024 18:06:28 +0300 Subject: [PATCH] Allow number filtering on Dispatch Rules Allow inbound number filtering on SIP Dispatch Rules. It works similar to Trunks, where rules without a number filter are grouped together and take less priority than number-specific rules. While at it, simplify the rule evaluation. Previously it was doing some hand-crafted checks for evaluation path, that matched the validation path. Same double logic existed for priorities as well. Now the validation is always called from evaluation, thus sharing the logic. And rule selection is simplified by just picking the first one after priority filtering. --- .changeset/nervous-dolphins-nail.md | 6 + livekit/livekit_sip.pb.go | 227 +++++++++++++++------------- livekit/livekit_sip.twirp.go | 130 ++++++++-------- protobufs/livekit_sip.proto | 9 ++ sip/sip.go | 126 ++++++--------- sip/sip_test.go | 39 +++++ 6 files changed, 292 insertions(+), 245 deletions(-) create mode 100644 .changeset/nervous-dolphins-nail.md diff --git a/.changeset/nervous-dolphins-nail.md b/.changeset/nervous-dolphins-nail.md new file mode 100644 index 00000000..fb72ab9f --- /dev/null +++ b/.changeset/nervous-dolphins-nail.md @@ -0,0 +1,6 @@ +--- +"github.com/livekit/protocol": minor +"@livekit/protocol": minor +--- + +Allow inbound number filtering on SIP Dispatch Rules diff --git a/livekit/livekit_sip.pb.go b/livekit/livekit_sip.pb.go index f8893cfe..905ec68c 100644 --- a/livekit/livekit_sip.pb.go +++ b/livekit/livekit_sip.pb.go @@ -665,6 +665,8 @@ type CreateSIPDispatchRuleRequest struct { // By default the From value (Phone number) is used as the participant identity // If true a random value will be used instead HidePhoneNumber bool `protobuf:"varint,3,opt,name=hide_phone_number,json=hidePhoneNumber,proto3" json:"hide_phone_number,omitempty"` + // Dispatch Rule will only accept a call made to these numbers (if set). + InboundNumbers []string `protobuf:"bytes,6,rep,name=inbound_numbers,json=inboundNumbers,proto3" json:"inbound_numbers,omitempty"` // Optional human-readable name for the Dispatch Rule. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // Optional user-defined metadata for the Dispatch Rule. @@ -724,6 +726,13 @@ func (x *CreateSIPDispatchRuleRequest) GetHidePhoneNumber() bool { return false } +func (x *CreateSIPDispatchRuleRequest) GetInboundNumbers() []string { + if x != nil { + return x.InboundNumbers + } + return nil +} + func (x *CreateSIPDispatchRuleRequest) GetName() string { if x != nil { return x.Name @@ -747,6 +756,8 @@ type SIPDispatchRuleInfo struct { Rule *SIPDispatchRule `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"` TrunkIds []string `protobuf:"bytes,3,rep,name=trunk_ids,json=trunkIds,proto3" json:"trunk_ids,omitempty"` HidePhoneNumber bool `protobuf:"varint,4,opt,name=hide_phone_number,json=hidePhoneNumber,proto3" json:"hide_phone_number,omitempty"` + // Dispatch Rule will only accept a call made to these numbers (if set). + InboundNumbers []string `protobuf:"bytes,7,rep,name=inbound_numbers,json=inboundNumbers,proto3" json:"inbound_numbers,omitempty"` // Human-readable name for the Dispatch Rule. Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` // User-defined metadata for the Dispatch Rule. @@ -814,6 +825,13 @@ func (x *SIPDispatchRuleInfo) GetHidePhoneNumber() bool { return false } +func (x *SIPDispatchRuleInfo) GetInboundNumbers() []string { + if x != nil { + return x.InboundNumbers + } + return nil +} + func (x *SIPDispatchRuleInfo) GetName() string { if x != nil { return x.Name @@ -1242,7 +1260,7 @@ var file_livekit_sip_proto_rawDesc = []byte{ 0x2e, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x16, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, - 0x64, 0x75, 0x61, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0xc5, 0x01, 0x0a, + 0x64, 0x75, 0x61, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, @@ -1252,111 +1270,116 @@ var file_livekit_sip_proto_rawDesc = []byte{ 0x74, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x69, 0x64, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x22, 0xed, 0x01, 0x0a, 0x13, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2f, 0x0a, 0x14, - 0x73, 0x69, 0x70, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x69, 0x70, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, - 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, - 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, - 0x72, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x74, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x69, 0x64, 0x65, - 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x69, 0x64, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x51, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, 0x44, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x4f, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x69, 0x70, 0x5f, 0x64, 0x69, 0x73, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x96, 0x02, + 0x0a, 0x13, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x69, 0x70, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x69, 0x70, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xc6, 0x02, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x53, 0x49, 0x50, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x69, 0x70, 0x5f, 0x74, 0x72, - 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, - 0x70, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x69, 0x70, 0x5f, - 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x69, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, - 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, - 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, - 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x6d, 0x66, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x6d, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6c, - 0x61, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x65, 0x22, - 0xab, 0x01, 0x0a, 0x12, 0x53, 0x49, 0x50, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, - 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, - 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, - 0x0b, 0x73, 0x69, 0x70, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x32, 0xdd, 0x04, - 0x0a, 0x03, 0x53, 0x49, 0x50, 0x12, 0x47, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x12, 0x1e, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, - 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, - 0x74, 0x2e, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, - 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x12, 0x1c, - 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, - 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, - 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x54, 0x72, - 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x12, 0x1e, 0x2e, - 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x49, - 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, - 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x25, 0x2e, - 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, + 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, + 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, + 0x72, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x72, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x74, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x64, + 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x69, + 0x64, 0x65, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x0f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, - 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x6c, 0x69, 0x76, 0x65, - 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, + 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x4f, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x69, 0x70, 0x5f, 0x64, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x69, 0x70, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xc6, 0x02, 0x0a, 0x1b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x69, 0x70, 0x5f, + 0x74, 0x72, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x69, 0x70, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x69, + 0x70, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, + 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x6f, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x74, 0x6d, 0x66, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x74, 0x6d, 0x66, 0x12, 0x23, 0x0a, 0x0d, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, + 0x65, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x53, 0x49, 0x50, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1e, 0x0a, 0x0b, 0x73, 0x69, 0x70, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x32, + 0xdd, 0x04, 0x0a, 0x03, 0x53, 0x49, 0x50, 0x12, 0x47, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x12, 0x1e, 0x2e, 0x6c, 0x69, 0x76, 0x65, + 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, + 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, + 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x4b, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, + 0x12, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x49, - 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x25, 0x2e, - 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x49, - 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, - 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x59, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x6c, 0x69, 0x76, - 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x46, 0x5a, - 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, - 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x76, - 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x2e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x3a, 0x3a, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, + 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x12, + 0x1e, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, 0x54, 0x72, 0x75, + 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x25, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, + 0x2e, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x6c, 0x69, + 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x25, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, + 0x2e, 0x53, 0x49, 0x50, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x59, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, + 0x50, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x6c, + 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x49, 0x50, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x49, 0x50, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, + 0x46, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, + 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, + 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, + 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/livekit/livekit_sip.twirp.go b/livekit/livekit_sip.twirp.go index 49f3c4f3..364558c3 100644 --- a/livekit/livekit_sip.twirp.go +++ b/livekit/livekit_sip.twirp.go @@ -2191,69 +2191,69 @@ func (s *sIPServer) PathPrefix() string { } var twirpFileDescriptor3 = []byte{ - // 1010 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x8e, 0x44, 0x49, 0x96, 0x46, 0xb2, 0x6c, 0xaf, 0xa5, 0x82, 0x95, 0xdd, 0xd4, 0xa0, 0x13, - 0x34, 0xfd, 0x81, 0x8c, 0xaa, 0x40, 0x81, 0xe6, 0x56, 0xdb, 0x48, 0x22, 0x24, 0x75, 0x55, 0x3a, - 0x3d, 0xb4, 0x08, 0xca, 0xd2, 0xda, 0xb5, 0xb5, 0x08, 0x45, 0xb2, 0xdc, 0xa5, 0x9b, 0xbc, 0x52, - 0xfb, 0x1c, 0xed, 0xad, 0x0f, 0xd0, 0x43, 0x5f, 0xa0, 0x40, 0x2f, 0x7d, 0x82, 0x60, 0x97, 0x4b, - 0x8a, 0xa4, 0x48, 0x59, 0xba, 0x89, 0xdf, 0xcc, 0x7e, 0x9c, 0x99, 0x6f, 0x66, 0x96, 0x82, 0x3d, - 0x87, 0xde, 0x92, 0xd7, 0x94, 0x5b, 0x8c, 0xfa, 0x43, 0x3f, 0xf0, 0xb8, 0x87, 0xb6, 0x14, 0x64, - 0xfc, 0xad, 0x41, 0xff, 0x2c, 0x20, 0x36, 0x27, 0x97, 0xe3, 0xc9, 0xcb, 0x20, 0x74, 0x5f, 0x9b, - 0xe4, 0x97, 0x90, 0x30, 0x8e, 0x3e, 0x85, 0x3d, 0xea, 0x5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0x2e, 0xb8, 0xd7, 0x06, 0x1f, 0x94, 0x58, 0xd5, 0x64, 0x3c, 0x85, 0x6e, 0xf6, 0xc6, 0x4a, - 0x45, 0x55, 0x78, 0x95, 0x95, 0x45, 0xf5, 0x2a, 0xf5, 0x99, 0x9c, 0xb9, 0x2c, 0x1e, 0x2e, 0x67, - 0x59, 0x30, 0x4e, 0x83, 0x95, 0x33, 0x89, 0x7e, 0x4e, 0x2e, 0xed, 0x0c, 0xf7, 0x71, 0x3e, 0xb9, - 0x22, 0xe6, 0x07, 0xab, 0x9d, 0x54, 0x21, 0x5e, 0xa5, 0xae, 0xee, 0x92, 0xf8, 0x57, 0xad, 0x83, - 0x3b, 0xe2, 0xff, 0x01, 0x7a, 0x45, 0xa3, 0x8f, 0x1e, 0x2c, 0x17, 0x67, 0x79, 0x33, 0x0c, 0x0e, - 0xd2, 0xdc, 0xb9, 0xb6, 0x3f, 0x7d, 0xf2, 0xe3, 0xf1, 0x0d, 0xe5, 0xb3, 0xf0, 0x6a, 0x38, 0xf5, - 0xe6, 0x27, 0xca, 0xf1, 0x44, 0xfe, 0x8b, 0x99, 0x7a, 0x4e, 0x0c, 0xfc, 0x56, 0xdd, 0x7e, 0x41, - 0x6f, 0xc9, 0x73, 0xca, 0x87, 0x13, 0x61, 0xfa, 0xb7, 0xda, 0x55, 0xcf, 0x8f, 0x1f, 0x4b, 0xe0, - 0xaa, 0x21, 0x8f, 0x7c, 0xf1, 0x2e, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xb6, 0x60, 0xa9, 0x0d, 0x0d, - 0x00, 0x00, + // 1023 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xdd, 0x72, 0xdb, 0x44, + 0x14, 0xae, 0x25, 0xc7, 0xb1, 0x8f, 0x1d, 0x27, 0xd9, 0xd8, 0x8c, 0x70, 0x42, 0xc9, 0x28, 0xed, + 0x50, 0x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77, 0xe4, 0xff, + 0x03, 0xf4, 0xca, 0x46, 0x1f, 0x3d, 0x58, 0x24, 0x67, 0x71, 0x33, 0x0c, 0xf6, 0xb3, 0xb1, 0x0b, + 0x6d, 0x7f, 0xf2, 0xe4, 0xc7, 0xa3, 0x6b, 0xca, 0x6f, 0xa2, 0xcb, 0xe1, 0xd4, 0x9f, 0x1d, 0x2b, + 0xc7, 0x63, 0xf9, 0xbf, 0x68, 0xea, 0xbb, 0x09, 0xf0, 0xbb, 0xb6, 0xf5, 0x82, 0xde, 0x92, 0xe7, + 0x94, 0x0f, 0x27, 0xc2, 0xf4, 0xaf, 0xd6, 0x55, 0xcf, 0x8f, 0x1f, 0x4b, 0xe0, 0xb2, 0x21, 0x8f, + 0x7c, 0xf1, 0x2e, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x9f, 0xdb, 0x9f, 0x5f, 0x0d, 0x00, 0x00, } diff --git a/protobufs/livekit_sip.proto b/protobufs/livekit_sip.proto index 84b055bc..a7314952 100644 --- a/protobufs/livekit_sip.proto +++ b/protobufs/livekit_sip.proto @@ -173,10 +173,15 @@ message CreateSIPDispatchRuleRequest { // If true a random value will be used instead bool hide_phone_number = 3; + // Dispatch Rule will only accept a call made to these numbers (if set). + repeated string inbound_numbers = 6; + // Optional human-readable name for the Dispatch Rule. string name = 4; // Optional user-defined metadata for the Dispatch Rule. string metadata = 5; + + // NEXT ID: 7 } message SIPDispatchRuleInfo { @@ -184,12 +189,16 @@ message SIPDispatchRuleInfo { SIPDispatchRule rule = 2; repeated string trunk_ids = 3; bool hide_phone_number = 4; + // Dispatch Rule will only accept a call made to these numbers (if set). + repeated string inbound_numbers = 7; // Human-readable name for the Dispatch Rule. string name = 5; // User-defined metadata for the Dispatch Rule. // Participants created by this rule will inherit this metadata. string metadata = 6; + + // NEXT ID: 8 } message ListSIPDispatchRuleRequest { diff --git a/sip/sip.go b/sip/sip.go index fe8a54a0..6751f34f 100644 --- a/sip/sip.go +++ b/sip/sip.go @@ -21,6 +21,8 @@ import ( "sort" "strconv" + "golang.org/x/exp/slices" + "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/logger" "github.com/livekit/protocol/rpc" @@ -49,30 +51,38 @@ func (e *ErrNoDispatchMatched) Error() string { // DispatchRulePriority returns sorting priority for dispatch rules. Lower value means higher priority. func DispatchRulePriority(info *livekit.SIPDispatchRuleInfo) int32 { - // In all these cases, prefer pin-protected rules. + // In all these cases, prefer pin-protected rules and rules for specific calling number. // Thus, the order will be the following: // - 0: Direct or Pin (both pin-protected) // - 1: Individual (pin-protected) // - 100: Direct (open) // - 101: Individual (open) + // Also, add 1K penalty for not specifying the calling number. const ( last = math.MaxInt32 ) // TODO: Maybe allow setting specific priorities for dispatch rules? + priority := int32(0) switch rule := info.GetRule().GetRule().(type) { default: return last case *livekit.SIPDispatchRule_DispatchRuleDirect: if rule.DispatchRuleDirect.GetPin() != "" { - return 0 + priority = 0 + } else { + priority = 100 } - return 100 case *livekit.SIPDispatchRule_DispatchRuleIndividual: if rule.DispatchRuleIndividual.GetPin() != "" { - return 1 + priority = 1 + } else { + priority = 101 } - return 101 } + if len(info.InboundNumbers) == 0 { + priority += 1000 + } + return priority } // SortDispatchRules predictably sorts dispatch rules by priority (first one is highest). @@ -103,33 +113,36 @@ func ValidateDispatchRules(rules []*livekit.SIPDispatchRuleInfo) error { if len(rules) == 0 { return nil } - byPinAndTrunk := make(map[string]map[string]*livekit.SIPDispatchRuleInfo) + type ruleKey struct { + Pin string + Trunk string + Number string + } + byRuleKey := make(map[ruleKey]*livekit.SIPDispatchRuleInfo) for _, r := range rules { _, pin, err := GetPinAndRoom(r) if err != nil { return err } - byTrunk := byPinAndTrunk[pin] - if byTrunk == nil { - byTrunk = make(map[string]*livekit.SIPDispatchRuleInfo) - byPinAndTrunk[pin] = byTrunk - } - if len(r.TrunkIds) == 0 { + trunks := r.TrunkIds + if len(trunks) == 0 { // This rule matches all trunks, but collides only with other default ones (specific rules take priority). - if r2 := byTrunk[""]; r2 != nil { - return fmt.Errorf("Conflicting SIP Dispatch Rules: Same PIN for %q and %q", - printID(r.SipDispatchRuleId), printID(r2.SipDispatchRuleId)) - } - byTrunk[""] = r - } else { - // Check all specific rules for the same pin. - for _, trunk := range r.TrunkIds { - r2 := byTrunk[trunk] + trunks = []string{""} + } + numbers := r.InboundNumbers + if len(numbers) == 0 { + // This rule matches all numbers, but collides only with other default ones (specific rules take priority). + numbers = []string{""} + } + for _, trunk := range trunks { + for _, number := range numbers { + key := ruleKey{Pin: pin, Trunk: trunk, Number: number} + r2 := byRuleKey[key] if r2 != nil { - return fmt.Errorf("Conflicting SIP Dispatch Rules: Same PIN for %q and %q", + return fmt.Errorf("Conflicting SIP Dispatch Rules: same Trunk+Number+PIN combination for for %q and %q", printID(r.SipDispatchRuleId), printID(r2.SipDispatchRuleId)) } - byTrunk[trunk] = r + byRuleKey[key] = r } } } @@ -140,47 +153,15 @@ func ValidateDispatchRules(rules []*livekit.SIPDispatchRuleInfo) error { // It returns an error if there are conflicting rules. Returns nil if no rules match. func SelectDispatchRule(rules []*livekit.SIPDispatchRuleInfo, req *rpc.EvaluateSIPDispatchRulesRequest) (*livekit.SIPDispatchRuleInfo, error) { if len(rules) == 0 { + // Nil is fine here. We will report "no rules matched" later. return nil, nil } - // Sorting will do the selection for us. We already filtered out irrelevant ones in matchSIPDispatchRule. - SortDispatchRules(rules) - byPin := make(map[string]*livekit.SIPDispatchRuleInfo) - var ( - pinRule *livekit.SIPDispatchRuleInfo - openRule *livekit.SIPDispatchRuleInfo - ) - openCnt := 0 - for _, r := range rules { - _, pin, err := GetPinAndRoom(r) - if err != nil { - return nil, err - } - if pin == "" { - openRule = r // last one - openCnt++ - } else if r2 := byPin[pin]; r2 != nil { - return nil, fmt.Errorf("Conflicting SIP Dispatch Rules: Same PIN for %q and %q", - r.SipDispatchRuleId, r2.SipDispatchRuleId) - } else { - byPin[pin] = r - // Pick the first one with a Pin. If Pin was provided in the request, we already filtered the right rules. - // If not, this rule will just be used to send RequestPin=true flag. - if pinRule == nil { - pinRule = r - } - } - } - if req.GetPin() != "" { - // If it's still nil that's fine. We will report "no rules matched" later. - return pinRule, nil - } - if pinRule != nil { - return pinRule, nil - } - if openCnt > 1 { - return nil, fmt.Errorf("Conflicting SIP Dispatch Rules: Matched %d open rules for %q", openCnt, req.CallingNumber) + if err := ValidateDispatchRules(rules); err != nil { + return nil, err } - return openRule, nil + // Sorting will do the selection for us. We already filtered out irrelevant ones in MatchDispatchRule and above. + SortDispatchRules(rules) + return rules[0], nil } // GetPinAndRoom returns a room name/prefix and the pin for a dispatch rule. Just a convenience wrapper. @@ -251,14 +232,7 @@ func MatchTrunk(trunks []*livekit.SIPTrunkInfo, calling, called string) (*liveki ) for _, tr := range trunks { // Do not consider it if number doesn't match. - matches := len(tr.InboundNumbers) == 0 - for _, exp := range tr.InboundNumbers { - if calling == exp { - matches = true - break - } - } - if !matches { + if len(tr.InboundNumbers) != 0 && !slices.Contains(tr.InboundNumbers, calling) { continue } // Deprecated, but we still check it for backward compatibility. @@ -309,7 +283,7 @@ func MatchDispatchRule(trunk *livekit.SIPTrunkInfo, rules []*livekit.SIPDispatch if len(rules) == 0 { return nil, &ErrNoDispatchMatched{NoRules: true, NoTrunks: trunk == nil, CalledNumber: req.CalledNumber} } - // We split the matched dispatch rules into two sets: specific and default (aka wildcard). + // We split the matched dispatch rules into two sets in relation to Trunks: specific and default (aka wildcard). // First, attempt to match any of the specific rules, where we did match the Trunk ID. // If nothing matches there - fallback to default/wildcard rules, where no Trunk IDs were mentioned. var ( @@ -319,6 +293,9 @@ func MatchDispatchRule(trunk *livekit.SIPTrunkInfo, rules []*livekit.SIPDispatch noPin := req.NoPin sentPin := req.GetPin() for _, info := range rules { + if len(info.InboundNumbers) != 0 && !slices.Contains(info.InboundNumbers, req.CallingNumber) { + continue + } _, rulePin, err := GetPinAndRoom(info) if err != nil { logger.Errorw("Invalid SIP Dispatch Rule", err, "dispatchRuleID", info.SipDispatchRuleId) @@ -350,14 +327,7 @@ func MatchDispatchRule(trunk *livekit.SIPTrunkInfo, rules []*livekit.SIPDispatch if trunk == nil { continue } - matches := false - for _, id := range info.TrunkIds { - if id == trunk.SipTrunkId { - matches = true - break - } - } - if !matches { + if !slices.Contains(info.TrunkIds, trunk.SipTrunkId) { continue } specificRules = append(specificRules, info) diff --git a/sip/sip_test.go b/sip/sip_test.go index 4d54bd59..a98bbb2c 100644 --- a/sip/sip_test.go +++ b/sip/sip_test.go @@ -384,6 +384,45 @@ var dispatchCases = []struct { expErr: true, invalid: true, }, + // Rules for specific numbers take priority. + { + name: "direct/number specific", + trunk: newSIPTrunkDispatch(), + rules: []*livekit.SIPDispatchRuleInfo{ + {TrunkIds: nil, Rule: newDirectDispatch("sip1", "")}, + {TrunkIds: nil, Rule: newDirectDispatch("sip2", ""), InboundNumbers: []string{sipNumber1}}, + }, + exp: 1, + }, + { + name: "direct/number specific pin", + trunk: newSIPTrunkDispatch(), + rules: []*livekit.SIPDispatchRuleInfo{ + {TrunkIds: nil, Rule: newDirectDispatch("sip1", "123")}, + {TrunkIds: nil, Rule: newDirectDispatch("sip2", "123"), InboundNumbers: []string{sipNumber1}}, + }, + exp: 1, + }, + { + name: "direct/number specific conflict", + trunk: newSIPTrunkDispatch(), + rules: []*livekit.SIPDispatchRuleInfo{ + {TrunkIds: nil, Rule: newDirectDispatch("sip1", ""), InboundNumbers: []string{sipNumber1}}, + {TrunkIds: nil, Rule: newDirectDispatch("sip2", ""), InboundNumbers: []string{sipNumber1, sipNumber2}}, + }, + expErr: true, + invalid: true, + }, + // Check the "personal room" use case. Rule that accepts a number without a pin and requires pin for everyone else. + { + name: "direct/open specific vs pin generic", + trunk: newSIPTrunkDispatch(), + rules: []*livekit.SIPDispatchRuleInfo{ + {TrunkIds: nil, Rule: newDirectDispatch("sip1", "123")}, + {TrunkIds: nil, Rule: newDirectDispatch("sip2", ""), InboundNumbers: []string{sipNumber1}}, + }, + exp: 1, + }, // Cannot use both direct and individual rules with the same pin setup. { name: "direct vs individual/private",