Apply approved SIP snapshots through isolated Dispatcher and Agent channel

This commit is contained in:
2026-10-03 12:45:11 +08:00
parent b68711be9c
commit a52fe5a741
32 changed files with 1437 additions and 128 deletions
+191 -79
View File
@@ -2107,6 +2107,102 @@ func (x *GetLoadedSIPResponse) GetTrunkRevision() map[string]int64 {
return nil
}
type ApplySIPRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
ApprovedSnapshotJson []byte `protobuf:"bytes,2,opt,name=approved_snapshot_json,json=approvedSnapshotJson,proto3" json:"approved_snapshot_json,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplySIPRequest) Reset() {
*x = ApplySIPRequest{}
mi := &file_agent_agent_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplySIPRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplySIPRequest) ProtoMessage() {}
func (x *ApplySIPRequest) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ApplySIPRequest.ProtoReflect.Descriptor instead.
func (*ApplySIPRequest) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{20}
}
func (x *ApplySIPRequest) GetMeta() *RequestMeta {
if x != nil {
return x.Meta
}
return nil
}
func (x *ApplySIPRequest) GetApprovedSnapshotJson() []byte {
if x != nil {
return x.ApprovedSnapshotJson
}
return nil
}
type ApplySIPResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
TrunkRevision map[string]int64 `protobuf:"bytes,1,rep,name=trunk_revision,json=trunkRevision,proto3" json:"trunk_revision,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplySIPResponse) Reset() {
*x = ApplySIPResponse{}
mi := &file_agent_agent_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplySIPResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplySIPResponse) ProtoMessage() {}
func (x *ApplySIPResponse) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ApplySIPResponse.ProtoReflect.Descriptor instead.
func (*ApplySIPResponse) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{21}
}
func (x *ApplySIPResponse) GetTrunkRevision() map[string]int64 {
if x != nil {
return x.TrunkRevision
}
return nil
}
// Current task-level control has no external command ID, revision CAS or
// execution binding. The authenticated session must match dispatcher_id.
type ApplyApprovedTaskControlRequest struct {
@@ -2123,7 +2219,7 @@ type ApplyApprovedTaskControlRequest struct {
func (x *ApplyApprovedTaskControlRequest) Reset() {
*x = ApplyApprovedTaskControlRequest{}
mi := &file_agent_agent_proto_msgTypes[20]
mi := &file_agent_agent_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2135,7 +2231,7 @@ func (x *ApplyApprovedTaskControlRequest) String() string {
func (*ApplyApprovedTaskControlRequest) ProtoMessage() {}
func (x *ApplyApprovedTaskControlRequest) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[20]
mi := &file_agent_agent_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2148,7 +2244,7 @@ func (x *ApplyApprovedTaskControlRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ApplyApprovedTaskControlRequest.ProtoReflect.Descriptor instead.
func (*ApplyApprovedTaskControlRequest) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{20}
return file_agent_agent_proto_rawDescGZIP(), []int{22}
}
func (x *ApplyApprovedTaskControlRequest) GetMeta() *RequestMeta {
@@ -2202,7 +2298,7 @@ type ApplyApprovedTaskControlResponse struct {
func (x *ApplyApprovedTaskControlResponse) Reset() {
*x = ApplyApprovedTaskControlResponse{}
mi := &file_agent_agent_proto_msgTypes[21]
mi := &file_agent_agent_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2214,7 +2310,7 @@ func (x *ApplyApprovedTaskControlResponse) String() string {
func (*ApplyApprovedTaskControlResponse) ProtoMessage() {}
func (x *ApplyApprovedTaskControlResponse) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[21]
mi := &file_agent_agent_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2227,7 +2323,7 @@ func (x *ApplyApprovedTaskControlResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ApplyApprovedTaskControlResponse.ProtoReflect.Descriptor instead.
func (*ApplyApprovedTaskControlResponse) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{21}
return file_agent_agent_proto_rawDescGZIP(), []int{23}
}
func (x *ApplyApprovedTaskControlResponse) GetAccepted() bool {
@@ -2253,7 +2349,7 @@ type UploadGrant struct {
func (x *UploadGrant) Reset() {
*x = UploadGrant{}
mi := &file_agent_agent_proto_msgTypes[22]
mi := &file_agent_agent_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2265,7 +2361,7 @@ func (x *UploadGrant) String() string {
func (*UploadGrant) ProtoMessage() {}
func (x *UploadGrant) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[22]
mi := &file_agent_agent_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2278,7 +2374,7 @@ func (x *UploadGrant) ProtoReflect() protoreflect.Message {
// Deprecated: Use UploadGrant.ProtoReflect.Descriptor instead.
func (*UploadGrant) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{22}
return file_agent_agent_proto_rawDescGZIP(), []int{24}
}
func (x *UploadGrant) GetUploadId() string {
@@ -2353,7 +2449,7 @@ type RequestRecordingUploadRequest struct {
func (x *RequestRecordingUploadRequest) Reset() {
*x = RequestRecordingUploadRequest{}
mi := &file_agent_agent_proto_msgTypes[23]
mi := &file_agent_agent_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2365,7 +2461,7 @@ func (x *RequestRecordingUploadRequest) String() string {
func (*RequestRecordingUploadRequest) ProtoMessage() {}
func (x *RequestRecordingUploadRequest) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[23]
mi := &file_agent_agent_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2378,7 +2474,7 @@ func (x *RequestRecordingUploadRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RequestRecordingUploadRequest.ProtoReflect.Descriptor instead.
func (*RequestRecordingUploadRequest) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{23}
return file_agent_agent_proto_rawDescGZIP(), []int{25}
}
func (x *RequestRecordingUploadRequest) GetMeta() *RequestMeta {
@@ -2432,7 +2528,7 @@ type RequestRecordingUploadResponse struct {
func (x *RequestRecordingUploadResponse) Reset() {
*x = RequestRecordingUploadResponse{}
mi := &file_agent_agent_proto_msgTypes[24]
mi := &file_agent_agent_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2444,7 +2540,7 @@ func (x *RequestRecordingUploadResponse) String() string {
func (*RequestRecordingUploadResponse) ProtoMessage() {}
func (x *RequestRecordingUploadResponse) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[24]
mi := &file_agent_agent_proto_msgTypes[26]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2457,7 +2553,7 @@ func (x *RequestRecordingUploadResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RequestRecordingUploadResponse.ProtoReflect.Descriptor instead.
func (*RequestRecordingUploadResponse) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{24}
return file_agent_agent_proto_rawDescGZIP(), []int{26}
}
func (x *RequestRecordingUploadResponse) GetGrant() *UploadGrant {
@@ -2479,7 +2575,7 @@ type ReportCallEndedRequest struct {
func (x *ReportCallEndedRequest) Reset() {
*x = ReportCallEndedRequest{}
mi := &file_agent_agent_proto_msgTypes[25]
mi := &file_agent_agent_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2491,7 +2587,7 @@ func (x *ReportCallEndedRequest) String() string {
func (*ReportCallEndedRequest) ProtoMessage() {}
func (x *ReportCallEndedRequest) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[25]
mi := &file_agent_agent_proto_msgTypes[27]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2504,7 +2600,7 @@ func (x *ReportCallEndedRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReportCallEndedRequest.ProtoReflect.Descriptor instead.
func (*ReportCallEndedRequest) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{25}
return file_agent_agent_proto_rawDescGZIP(), []int{27}
}
func (x *ReportCallEndedRequest) GetMeta() *RequestMeta {
@@ -2544,7 +2640,7 @@ type ReportCallEndedResponse struct {
func (x *ReportCallEndedResponse) Reset() {
*x = ReportCallEndedResponse{}
mi := &file_agent_agent_proto_msgTypes[26]
mi := &file_agent_agent_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2556,7 +2652,7 @@ func (x *ReportCallEndedResponse) String() string {
func (*ReportCallEndedResponse) ProtoMessage() {}
func (x *ReportCallEndedResponse) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[26]
mi := &file_agent_agent_proto_msgTypes[28]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2569,7 +2665,7 @@ func (x *ReportCallEndedResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReportCallEndedResponse.ProtoReflect.Descriptor instead.
func (*ReportCallEndedResponse) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{26}
return file_agent_agent_proto_rawDescGZIP(), []int{28}
}
func (x *ReportCallEndedResponse) GetReceipt() *OperationReceipt {
@@ -2592,7 +2688,7 @@ type UploadObservation struct {
func (x *UploadObservation) Reset() {
*x = UploadObservation{}
mi := &file_agent_agent_proto_msgTypes[27]
mi := &file_agent_agent_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2604,7 +2700,7 @@ func (x *UploadObservation) String() string {
func (*UploadObservation) ProtoMessage() {}
func (x *UploadObservation) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[27]
mi := &file_agent_agent_proto_msgTypes[29]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2617,7 +2713,7 @@ func (x *UploadObservation) ProtoReflect() protoreflect.Message {
// Deprecated: Use UploadObservation.ProtoReflect.Descriptor instead.
func (*UploadObservation) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{27}
return file_agent_agent_proto_rawDescGZIP(), []int{29}
}
func (x *UploadObservation) GetUploadId() string {
@@ -2669,7 +2765,7 @@ type ReportCallResultRequest struct {
func (x *ReportCallResultRequest) Reset() {
*x = ReportCallResultRequest{}
mi := &file_agent_agent_proto_msgTypes[28]
mi := &file_agent_agent_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2681,7 +2777,7 @@ func (x *ReportCallResultRequest) String() string {
func (*ReportCallResultRequest) ProtoMessage() {}
func (x *ReportCallResultRequest) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[28]
mi := &file_agent_agent_proto_msgTypes[30]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2694,7 +2790,7 @@ func (x *ReportCallResultRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReportCallResultRequest.ProtoReflect.Descriptor instead.
func (*ReportCallResultRequest) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{28}
return file_agent_agent_proto_rawDescGZIP(), []int{30}
}
func (x *ReportCallResultRequest) GetMeta() *RequestMeta {
@@ -2748,7 +2844,7 @@ type ReportCallResultResponse struct {
func (x *ReportCallResultResponse) Reset() {
*x = ReportCallResultResponse{}
mi := &file_agent_agent_proto_msgTypes[29]
mi := &file_agent_agent_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2760,7 +2856,7 @@ func (x *ReportCallResultResponse) String() string {
func (*ReportCallResultResponse) ProtoMessage() {}
func (x *ReportCallResultResponse) ProtoReflect() protoreflect.Message {
mi := &file_agent_agent_proto_msgTypes[29]
mi := &file_agent_agent_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2773,7 +2869,7 @@ func (x *ReportCallResultResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReportCallResultResponse.ProtoReflect.Descriptor instead.
func (*ReportCallResultResponse) Descriptor() ([]byte, []int) {
return file_agent_agent_proto_rawDescGZIP(), []int{29}
return file_agent_agent_proto_rawDescGZIP(), []int{31}
}
func (x *ReportCallResultResponse) GetReceipt() *OperationReceipt {
@@ -2943,6 +3039,14 @@ const file_agent_agent_proto_rawDesc = "" +
"\x0etrunk_revision\x18\x01 \x03(\v2..agent.GetLoadedSIPResponse.TrunkRevisionEntryR\rtrunkRevision\x1a@\n" +
"\x12TrunkRevisionEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\"o\n" +
"\x0fApplySIPRequest\x12&\n" +
"\x04meta\x18\x01 \x01(\v2\x12.agent.RequestMetaR\x04meta\x124\n" +
"\x16approved_snapshot_json\x18\x02 \x01(\fR\x14approvedSnapshotJson\"\xa7\x01\n" +
"\x10ApplySIPResponse\x12Q\n" +
"\x0etrunk_revision\x18\x01 \x03(\v2*.agent.ApplySIPResponse.TrunkRevisionEntryR\rtrunkRevision\x1a@\n" +
"\x12TrunkRevisionEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\"\x99\x02\n" +
"\x1fApplyApprovedTaskControlRequest\x12&\n" +
"\x04meta\x18\x01 \x01(\v2\x12.agent.RequestMetaR\x04meta\x12#\n" +
@@ -3041,13 +3145,14 @@ const file_agent_agent_proto_rawDesc = "" +
"\tAssetKind\x12\x1a\n" +
"\x16ASSET_KIND_UNSPECIFIED\x10\x00\x12\x18\n" +
"\x14ASSET_KIND_RECORDING\x10\x01\x12\x19\n" +
"\x15ASSET_KIND_TRANSCRIPT\x10\x022\xc6\x05\n" +
"\x15ASSET_KIND_TRANSCRIPT\x10\x022\x83\x06\n" +
"\x13AgentControlService\x12M\n" +
"\x0eGetAgentStatus\x12\x1c.agent.GetAgentStatusRequest\x1a\x1d.agent.GetAgentStatusResponse\x12J\n" +
"\rActivateAgent\x12\x1b.agent.ActivateAgentRequest\x1a\x1c.agent.ActivateAgentResponse\x12P\n" +
"\x0fExecuteApproved\x12\x1d.agent.ExecuteApprovedRequest\x1a\x1e.agent.ExecuteApprovedResponse\x12k\n" +
"\x18ApplyApprovedTaskControl\x12&.agent.ApplyApprovedTaskControlRequest\x1a'.agent.ApplyApprovedTaskControlResponse\x12G\n" +
"\fGetLoadedSIP\x12\x1a.agent.GetLoadedSIPRequest\x1a\x1b.agent.GetLoadedSIPResponse\x12e\n" +
"\fGetLoadedSIP\x12\x1a.agent.GetLoadedSIPRequest\x1a\x1b.agent.GetLoadedSIPResponse\x12;\n" +
"\bApplySIP\x12\x16.agent.ApplySIPRequest\x1a\x17.agent.ApplySIPResponse\x12e\n" +
"\x16RequestRecordingUpload\x12$.agent.RequestRecordingUploadRequest\x1a%.agent.RequestRecordingUploadResponse\x12P\n" +
"\x0fReportCallEnded\x12\x1d.agent.ReportCallEndedRequest\x1a\x1e.agent.ReportCallEndedResponse\x12S\n" +
"\x10ReportCallResult\x12\x1e.agent.ReportCallResultRequest\x1a\x1f.agent.ReportCallResultResponseB-Z+git.ipao.vip/rogee/go-sip/gen/agent;agentpbb\x06proto3"
@@ -3065,7 +3170,7 @@ func file_agent_agent_proto_rawDescGZIP() []byte {
}
var file_agent_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
var file_agent_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
var file_agent_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
var file_agent_agent_proto_goTypes = []any{
(ResultCode)(0), // 0: agent.ResultCode
(FailureCode)(0), // 1: agent.FailureCode
@@ -3094,17 +3199,20 @@ var file_agent_agent_proto_goTypes = []any{
(*ExecuteApprovedResponse)(nil), // 24: agent.ExecuteApprovedResponse
(*GetLoadedSIPRequest)(nil), // 25: agent.GetLoadedSIPRequest
(*GetLoadedSIPResponse)(nil), // 26: agent.GetLoadedSIPResponse
(*ApplyApprovedTaskControlRequest)(nil), // 27: agent.ApplyApprovedTaskControlRequest
(*ApplyApprovedTaskControlResponse)(nil), // 28: agent.ApplyApprovedTaskControlResponse
(*UploadGrant)(nil), // 29: agent.UploadGrant
(*RequestRecordingUploadRequest)(nil), // 30: agent.RequestRecordingUploadRequest
(*RequestRecordingUploadResponse)(nil), // 31: agent.RequestRecordingUploadResponse
(*ReportCallEndedRequest)(nil), // 32: agent.ReportCallEndedRequest
(*ReportCallEndedResponse)(nil), // 33: agent.ReportCallEndedResponse
(*UploadObservation)(nil), // 34: agent.UploadObservation
(*ReportCallResultRequest)(nil), // 35: agent.ReportCallResultRequest
(*ReportCallResultResponse)(nil), // 36: agent.ReportCallResultResponse
nil, // 37: agent.GetLoadedSIPResponse.TrunkRevisionEntry
(*ApplySIPRequest)(nil), // 27: agent.ApplySIPRequest
(*ApplySIPResponse)(nil), // 28: agent.ApplySIPResponse
(*ApplyApprovedTaskControlRequest)(nil), // 29: agent.ApplyApprovedTaskControlRequest
(*ApplyApprovedTaskControlResponse)(nil), // 30: agent.ApplyApprovedTaskControlResponse
(*UploadGrant)(nil), // 31: agent.UploadGrant
(*RequestRecordingUploadRequest)(nil), // 32: agent.RequestRecordingUploadRequest
(*RequestRecordingUploadResponse)(nil), // 33: agent.RequestRecordingUploadResponse
(*ReportCallEndedRequest)(nil), // 34: agent.ReportCallEndedRequest
(*ReportCallEndedResponse)(nil), // 35: agent.ReportCallEndedResponse
(*UploadObservation)(nil), // 36: agent.UploadObservation
(*ReportCallResultRequest)(nil), // 37: agent.ReportCallResultRequest
(*ReportCallResultResponse)(nil), // 38: agent.ReportCallResultResponse
nil, // 39: agent.GetLoadedSIPResponse.TrunkRevisionEntry
nil, // 40: agent.ApplySIPResponse.TrunkRevisionEntry
}
var file_agent_agent_proto_depIdxs = []int32{
1, // 0: agent.Failure.code:type_name -> agent.FailureCode
@@ -3129,40 +3237,44 @@ var file_agent_agent_proto_depIdxs = []int32{
9, // 19: agent.ActivateAgentResponse.failure:type_name -> agent.Failure
7, // 20: agent.ExecuteApprovedRequest.meta:type_name -> agent.RequestMeta
7, // 21: agent.GetLoadedSIPRequest.meta:type_name -> agent.RequestMeta
37, // 22: agent.GetLoadedSIPResponse.trunk_revision:type_name -> agent.GetLoadedSIPResponse.TrunkRevisionEntry
7, // 23: agent.ApplyApprovedTaskControlRequest.meta:type_name -> agent.RequestMeta
4, // 24: agent.ApplyApprovedTaskControlRequest.action:type_name -> agent.ControlAction
5, // 25: agent.ApplyApprovedTaskControlRequest.active_call_policy:type_name -> agent.ActiveCallPolicy
18, // 26: agent.UploadGrant.headers:type_name -> agent.Header
7, // 27: agent.RequestRecordingUploadRequest.meta:type_name -> agent.RequestMeta
17, // 28: agent.RequestRecordingUploadRequest.asset:type_name -> agent.AssetDescriptor
29, // 29: agent.RequestRecordingUploadResponse.grant:type_name -> agent.UploadGrant
7, // 30: agent.ReportCallEndedRequest.meta:type_name -> agent.RequestMeta
10, // 31: agent.ReportCallEndedResponse.receipt:type_name -> agent.OperationReceipt
7, // 32: agent.ReportCallResultRequest.meta:type_name -> agent.RequestMeta
34, // 33: agent.ReportCallResultRequest.upload:type_name -> agent.UploadObservation
10, // 34: agent.ReportCallResultResponse.receipt:type_name -> agent.OperationReceipt
19, // 35: agent.AgentControlService.GetAgentStatus:input_type -> agent.GetAgentStatusRequest
21, // 36: agent.AgentControlService.ActivateAgent:input_type -> agent.ActivateAgentRequest
23, // 37: agent.AgentControlService.ExecuteApproved:input_type -> agent.ExecuteApprovedRequest
27, // 38: agent.AgentControlService.ApplyApprovedTaskControl:input_type -> agent.ApplyApprovedTaskControlRequest
25, // 39: agent.AgentControlService.GetLoadedSIP:input_type -> agent.GetLoadedSIPRequest
30, // 40: agent.AgentControlService.RequestRecordingUpload:input_type -> agent.RequestRecordingUploadRequest
32, // 41: agent.AgentControlService.ReportCallEnded:input_type -> agent.ReportCallEndedRequest
35, // 42: agent.AgentControlService.ReportCallResult:input_type -> agent.ReportCallResultRequest
20, // 43: agent.AgentControlService.GetAgentStatus:output_type -> agent.GetAgentStatusResponse
22, // 44: agent.AgentControlService.ActivateAgent:output_type -> agent.ActivateAgentResponse
24, // 45: agent.AgentControlService.ExecuteApproved:output_type -> agent.ExecuteApprovedResponse
28, // 46: agent.AgentControlService.ApplyApprovedTaskControl:output_type -> agent.ApplyApprovedTaskControlResponse
26, // 47: agent.AgentControlService.GetLoadedSIP:output_type -> agent.GetLoadedSIPResponse
31, // 48: agent.AgentControlService.RequestRecordingUpload:output_type -> agent.RequestRecordingUploadResponse
33, // 49: agent.AgentControlService.ReportCallEnded:output_type -> agent.ReportCallEndedResponse
36, // 50: agent.AgentControlService.ReportCallResult:output_type -> agent.ReportCallResultResponse
43, // [43:51] is the sub-list for method output_type
35, // [35:43] is the sub-list for method input_type
35, // [35:35] is the sub-list for extension type_name
35, // [35:35] is the sub-list for extension extendee
0, // [0:35] is the sub-list for field type_name
39, // 22: agent.GetLoadedSIPResponse.trunk_revision:type_name -> agent.GetLoadedSIPResponse.TrunkRevisionEntry
7, // 23: agent.ApplySIPRequest.meta:type_name -> agent.RequestMeta
40, // 24: agent.ApplySIPResponse.trunk_revision:type_name -> agent.ApplySIPResponse.TrunkRevisionEntry
7, // 25: agent.ApplyApprovedTaskControlRequest.meta:type_name -> agent.RequestMeta
4, // 26: agent.ApplyApprovedTaskControlRequest.action:type_name -> agent.ControlAction
5, // 27: agent.ApplyApprovedTaskControlRequest.active_call_policy:type_name -> agent.ActiveCallPolicy
18, // 28: agent.UploadGrant.headers:type_name -> agent.Header
7, // 29: agent.RequestRecordingUploadRequest.meta:type_name -> agent.RequestMeta
17, // 30: agent.RequestRecordingUploadRequest.asset:type_name -> agent.AssetDescriptor
31, // 31: agent.RequestRecordingUploadResponse.grant:type_name -> agent.UploadGrant
7, // 32: agent.ReportCallEndedRequest.meta:type_name -> agent.RequestMeta
10, // 33: agent.ReportCallEndedResponse.receipt:type_name -> agent.OperationReceipt
7, // 34: agent.ReportCallResultRequest.meta:type_name -> agent.RequestMeta
36, // 35: agent.ReportCallResultRequest.upload:type_name -> agent.UploadObservation
10, // 36: agent.ReportCallResultResponse.receipt:type_name -> agent.OperationReceipt
19, // 37: agent.AgentControlService.GetAgentStatus:input_type -> agent.GetAgentStatusRequest
21, // 38: agent.AgentControlService.ActivateAgent:input_type -> agent.ActivateAgentRequest
23, // 39: agent.AgentControlService.ExecuteApproved:input_type -> agent.ExecuteApprovedRequest
29, // 40: agent.AgentControlService.ApplyApprovedTaskControl:input_type -> agent.ApplyApprovedTaskControlRequest
25, // 41: agent.AgentControlService.GetLoadedSIP:input_type -> agent.GetLoadedSIPRequest
27, // 42: agent.AgentControlService.ApplySIP:input_type -> agent.ApplySIPRequest
32, // 43: agent.AgentControlService.RequestRecordingUpload:input_type -> agent.RequestRecordingUploadRequest
34, // 44: agent.AgentControlService.ReportCallEnded:input_type -> agent.ReportCallEndedRequest
37, // 45: agent.AgentControlService.ReportCallResult:input_type -> agent.ReportCallResultRequest
20, // 46: agent.AgentControlService.GetAgentStatus:output_type -> agent.GetAgentStatusResponse
22, // 47: agent.AgentControlService.ActivateAgent:output_type -> agent.ActivateAgentResponse
24, // 48: agent.AgentControlService.ExecuteApproved:output_type -> agent.ExecuteApprovedResponse
30, // 49: agent.AgentControlService.ApplyApprovedTaskControl:output_type -> agent.ApplyApprovedTaskControlResponse
26, // 50: agent.AgentControlService.GetLoadedSIP:output_type -> agent.GetLoadedSIPResponse
28, // 51: agent.AgentControlService.ApplySIP:output_type -> agent.ApplySIPResponse
33, // 52: agent.AgentControlService.RequestRecordingUpload:output_type -> agent.RequestRecordingUploadResponse
35, // 53: agent.AgentControlService.ReportCallEnded:output_type -> agent.ReportCallEndedResponse
38, // 54: agent.AgentControlService.ReportCallResult:output_type -> agent.ReportCallResultResponse
46, // [46:55] is the sub-list for method output_type
37, // [37:46] is the sub-list for method input_type
37, // [37:37] is the sub-list for extension type_name
37, // [37:37] is the sub-list for extension extendee
0, // [0:37] is the sub-list for field type_name
}
func init() { file_agent_agent_proto_init() }
@@ -3176,7 +3288,7 @@ func file_agent_agent_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_agent_agent_proto_rawDesc), len(file_agent_agent_proto_rawDesc)),
NumEnums: 7,
NumMessages: 31,
NumMessages: 34,
NumExtensions: 0,
NumServices: 1,
},
+40
View File
@@ -24,6 +24,7 @@ const (
AgentControlService_ExecuteApproved_FullMethodName = "/agent.AgentControlService/ExecuteApproved"
AgentControlService_ApplyApprovedTaskControl_FullMethodName = "/agent.AgentControlService/ApplyApprovedTaskControl"
AgentControlService_GetLoadedSIP_FullMethodName = "/agent.AgentControlService/GetLoadedSIP"
AgentControlService_ApplySIP_FullMethodName = "/agent.AgentControlService/ApplySIP"
AgentControlService_RequestRecordingUpload_FullMethodName = "/agent.AgentControlService/RequestRecordingUpload"
AgentControlService_ReportCallEnded_FullMethodName = "/agent.AgentControlService/ReportCallEnded"
AgentControlService_ReportCallResult_FullMethodName = "/agent.AgentControlService/ReportCallResult"
@@ -42,6 +43,8 @@ type AgentControlServiceClient interface {
ExecuteApproved(ctx context.Context, in *ExecuteApprovedRequest, opts ...grpc.CallOption) (*ExecuteApprovedResponse, error)
ApplyApprovedTaskControl(ctx context.Context, in *ApplyApprovedTaskControlRequest, opts ...grpc.CallOption) (*ApplyApprovedTaskControlResponse, error)
GetLoadedSIP(ctx context.Context, in *GetLoadedSIPRequest, opts ...grpc.CallOption) (*GetLoadedSIPResponse, error)
// Only a pinned, activated Dispatcher may apply the complete approved SIP snapshot.
ApplySIP(ctx context.Context, in *ApplySIPRequest, opts ...grpc.CallOption) (*ApplySIPResponse, error)
// Agent requests a fresh bounded token explicitly; the Dispatcher owns the original target.
RequestRecordingUpload(ctx context.Context, in *RequestRecordingUploadRequest, opts ...grpc.CallOption) (*RequestRecordingUploadResponse, error)
ReportCallEnded(ctx context.Context, in *ReportCallEndedRequest, opts ...grpc.CallOption) (*ReportCallEndedResponse, error)
@@ -106,6 +109,16 @@ func (c *agentControlServiceClient) GetLoadedSIP(ctx context.Context, in *GetLoa
return out, nil
}
func (c *agentControlServiceClient) ApplySIP(ctx context.Context, in *ApplySIPRequest, opts ...grpc.CallOption) (*ApplySIPResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplySIPResponse)
err := c.cc.Invoke(ctx, AgentControlService_ApplySIP_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *agentControlServiceClient) RequestRecordingUpload(ctx context.Context, in *RequestRecordingUploadRequest, opts ...grpc.CallOption) (*RequestRecordingUploadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RequestRecordingUploadResponse)
@@ -149,6 +162,8 @@ type AgentControlServiceServer interface {
ExecuteApproved(context.Context, *ExecuteApprovedRequest) (*ExecuteApprovedResponse, error)
ApplyApprovedTaskControl(context.Context, *ApplyApprovedTaskControlRequest) (*ApplyApprovedTaskControlResponse, error)
GetLoadedSIP(context.Context, *GetLoadedSIPRequest) (*GetLoadedSIPResponse, error)
// Only a pinned, activated Dispatcher may apply the complete approved SIP snapshot.
ApplySIP(context.Context, *ApplySIPRequest) (*ApplySIPResponse, error)
// Agent requests a fresh bounded token explicitly; the Dispatcher owns the original target.
RequestRecordingUpload(context.Context, *RequestRecordingUploadRequest) (*RequestRecordingUploadResponse, error)
ReportCallEnded(context.Context, *ReportCallEndedRequest) (*ReportCallEndedResponse, error)
@@ -178,6 +193,9 @@ func (UnimplementedAgentControlServiceServer) ApplyApprovedTaskControl(context.C
func (UnimplementedAgentControlServiceServer) GetLoadedSIP(context.Context, *GetLoadedSIPRequest) (*GetLoadedSIPResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLoadedSIP not implemented")
}
func (UnimplementedAgentControlServiceServer) ApplySIP(context.Context, *ApplySIPRequest) (*ApplySIPResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ApplySIP not implemented")
}
func (UnimplementedAgentControlServiceServer) RequestRecordingUpload(context.Context, *RequestRecordingUploadRequest) (*RequestRecordingUploadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RequestRecordingUpload not implemented")
}
@@ -298,6 +316,24 @@ func _AgentControlService_GetLoadedSIP_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _AgentControlService_ApplySIP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ApplySIPRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AgentControlServiceServer).ApplySIP(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AgentControlService_ApplySIP_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AgentControlServiceServer).ApplySIP(ctx, req.(*ApplySIPRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AgentControlService_RequestRecordingUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequestRecordingUploadRequest)
if err := dec(in); err != nil {
@@ -379,6 +415,10 @@ var AgentControlService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetLoadedSIP",
Handler: _AgentControlService_GetLoadedSIP_Handler,
},
{
MethodName: "ApplySIP",
Handler: _AgentControlService_ApplySIP_Handler,
},
{
MethodName: "RequestRecordingUpload",
Handler: _AgentControlService_RequestRecordingUpload_Handler,