Skip to content

Commit 30a8e45

Browse files
authored
Merge pull request #16 from tcncloud/adding-transfer-protos
Adds call transfer functionality.
2 parents 8056996 + e0f3c41 commit 30a8e45

File tree

2 files changed

+56
-6
lines changed

2 files changed

+56
-6
lines changed

tcnapi/exile/gate/v2/entities.proto

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,13 @@ message ExileTransferInstance {
202202
}
203203
enum TransferType {
204204
TRANSFER_TYPE_UNSPECIFIED = 0;
205-
WARM_AGENT = 1;
206-
WARM_CALLER = 2;
207-
WARM_OUTBOUND = 3;
208-
WARM_SKILL = 4;
209-
COLD_AGENT = 5;
210-
COLD_OUTBOUND = 6;
205+
WARM_AGENT = 1; // Warm transfer to another agent
206+
WARM_CALLER = 2; // Transfer involving caller interaction
207+
WARM_OUTBOUND = 3; // Warm transfer to external phone/PBX extension
208+
WARM_SKILL = 4; // Warm transfer to skill queue/hunt group
209+
COLD_AGENT = 5; // Cold transfer to another agent
210+
COLD_OUTBOUND = 6; // Cold transfer to external phone/PBX extension
211+
CONFERENCE = 7; // Conference all parties together
211212
}
212213
enum TransferResultType {
213214
TRANSFER_RESULT_TYPE_UNSPECIFIED = 0;

tcnapi/exile/gate/v2/public.proto

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ service GateService {
181181
body: "*"
182182
};
183183
}
184+
184185
rpc ListNCLRulesetNames(ListNCLRulesetNamesRequest) returns (ListNCLRulesetNamesResponse) {
185186
option (google.api.http) = {get: "/tcnapi/exile/gate/v2/list_ncl_ruleset_names"};
186187
}
@@ -299,6 +300,12 @@ service GateService {
299300
body: "*"
300301
};
301302
}
303+
rpc Transfer(TransferRequest) returns (TransferResponse) {
304+
option (google.api.http) = {
305+
get: "/tcnapi/exile/gate/v2/transfer"
306+
body: "*"
307+
};
308+
}
302309
}
303310

304311
// TimeRange represents an inclusive time interval for filtering logs.
@@ -1176,6 +1183,48 @@ message DialResponse {
11761183
string caller_sid = 9 [deprecated = true];
11771184
}
11781185

1186+
/**
1187+
* Transfer Request/Response Messages
1188+
* These messages handle the various types of call transfers.
1189+
*/
1190+
1191+
/**
1192+
* Request message for transferring a call to another agent.
1193+
* Supports: Cold transfer, Warm transfer, and Conference.
1194+
*/
1195+
1196+
message TransferRequest {
1197+
string partner_agent_id = 1;
1198+
oneof destination {
1199+
Agent receiving_partner_agent_id = 2;
1200+
Outbound outbound = 3;
1201+
Queue queue = 4;
1202+
}
1203+
Kind kind = 5;
1204+
Action action = 6;
1205+
1206+
enum Kind {
1207+
KIND_COLD = 0;
1208+
WARM = 1;
1209+
}
1210+
enum Action {
1211+
ACTION_START = 0;
1212+
APPROVE = 1;
1213+
CANCEL = 2;
1214+
}
1215+
message Agent {
1216+
string partner_agent_id = 1;
1217+
}
1218+
message Outbound {
1219+
string caller_id = 1;
1220+
string destination = 2;
1221+
bool caller_hold = 3;
1222+
}
1223+
message Queue {}
1224+
}
1225+
1226+
message TransferResponse {}
1227+
11791228
message ListNCLRulesetNamesRequest {}
11801229
message ListNCLRulesetNamesResponse {
11811230
repeated string ruleset_names = 1;

0 commit comments

Comments
 (0)