We're an all-Windows shop, so unfortunately we can't use Web Services, and I'm essentially writing that layer on top of the Platform SDK. I tried to translate your example to C# and this is what I came up with:
private void switchMonitorMode(string dn, ConnectionId connId, string monitoringScope, string monitoringMode)
{
RequestQueryCall requestQueryCall = RequestQueryCall.Create(dn, connId, CallInfoType.PartiesQuery);
IMessage responsePartyInfo = serverProtocol.Request(requestQueryCall);
EventPartyInfo callParties = (EventPartyInfo)responsePartyInfo;
if (callParties.Extensions["MonitorMode"].ToString() == "Connect")
{
RequestSetMuteOn request = RequestSetMuteOn.Create(dn, connId);
request.Extensions.Add("MonitorScope", monitoringScope); // must be "Call" or "Agent"
request.Extensions.Add("MonitorMode", monitoringMode); // must be "Mute", "Coach", or "Connect"
IMessage responseMuteOn = serverProtocol.Request(request);
// TODO: handle response
}
else
{
RequestSetMuteOff request = RequestSetMuteOff.Create(dn, connId);
request.Extensions.Add("MonitorScope", monitoringScope); // must be "Call" or "Agent"
request.Extensions.Add("MonitorMode", monitoringMode); // must be "Mute", "Coach", or "Connect"
IMessage responseMuteOff = serverProtocol.Request(request);
// TODO: handle response
}
}
My testing environment is currently unavailable, so I'm not yet able to test this code myself. I'm not actually sure if a PartiesQuery will return an extension with key "MonitorMode". I was just trying to mimic your javascript code.
I'll let you know once I'm able to test this. Your assistance has been really valuable, thanks!
------------------------------
Jeff Collell
Fisher Investments
------------------------------
Original Message:
Sent: 09-17-2019 12:36
From: Jim Crespino
Subject: Platform SDK Barge and Coach
Jeff,
Maybe this will help...
For barge in:
public switchToBargeIn(connId: string, monitoringScope: MonitoringScope, externalId: string = undefined): Promise<any> {
return this._post('mute-off', {
thisDN: this.dnNumber,
connID: connId,
extensions: [
{
type: 'str',
key: 'MonitorScope',
value: monitoringScope.toLowerCase()
},
{
type: 'str',
key: 'MonitorMode',
value: 'connect'
}
]
}, false, externalId);
}
For Coaching:
public switchToCoaching(connId: string, monitoringScope: MonitoringScope, externalId: string = undefined): Promise<any> {
let operation: Operation = 'mute-off';
let party: Party = this.getPartyForConnId(connId);
if (party && party.monitoringInfo && party.monitoringInfo.monitorMode === 'Connect') {
operation = 'mute-on';
}
return this._post(operation, {
thisDN: this.dnNumber,
connID: connId,
extensions: [
{
type: 'str',
key: 'MonitorScope',
value: monitoringScope.toLowerCase()
},
{
type: 'str',
key: 'MonitorMode',
value: 'coach'
}
]
}, false, externalId
);
}
Monitoring Scope is enum:
export type MonitoringScope =
'Call'
| 'Agent';
export type MonitoringNextCallType =
'OneCall'
| 'AllCalls';
export type MonitorMode =
'Mute'
| 'Coach'
| 'Connect';
Hopefully that will get you on your way. Let me know.
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com
Original Message:
Sent: 09-17-2019 11:31
From: Jeff Collell
Subject: Platform SDK Barge and Coach
Wonderful, thank you! Unfortunately I don't have much server access in our environment. I'm guessing it's platform dependent since not all voice platforms support selective mute.
------------------------------
Jeff Collell
Fisher Investments
Original Message:
Sent: 09-17-2019 11:25
From: Jim Crespino
Subject: Platform SDK Barge and Coach
That's funny. I was just going to suggest that you use WDE to perform your use case and then dig into the TServer/SIPServer log file for that ConnID and figure out what requests are being made and events generated.
I've asked engineering to explain to me how they implemented barge-in and coaching in the Genesys Web Services. If/when I get that info back, I'll share it with you.
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com
Original Message:
Sent: 09-17-2019 10:31
From: Jeff Collell
Subject: Platform SDK Barge and Coach
Hmm. How would I Coach? Such that the agent can hear the supervisor, but the customer cannot? Are there any extension libraries for this? Perhaps a vendor-specific DLL that is needed to send a RequestCreateCall with special extension properties? I'm tempted to just packet cap the queries/events from Workspace Desktop if I can't find docs/binaries needed to do this the official way.
------------------------------
Jeff Collell
Fisher Investments
Original Message:
Sent: 09-17-2019 09:50
From: Jim Crespino
Subject: Platform SDK Barge and Coach
Jeff,
Check out these docs: https://docs.genesys.com/Documentation/PSDK/9.0.x/TlibRef/TMonitorNextCall
I think you'll need to use a combination of RequestMonitorNextCall and RequestSetMuteOff/On to control whether you are in coaching mode or barge-in mode. With RequestSetMuteOn/Off you can specify the DN, so for barge-in you can mute the agent and unmute the supervisor.
Hope that helps.
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com
Original Message:
Sent: 09-16-2019 16:23
From: Jeff Collell
Subject: Platform SDK Barge and Coach
I'm looking for any documentation around the supervisor Barge and Coaching functionality using only the Platform SDK (v8.5). We have a Cisco T-server, and our application uses .NET and C# to make calls to the SDK.
I think the solution will be some kind of extension data on top of the usual RequestMakeCall method. I even see there is a MakeCallType of SupervisorAssist. Perhaps it is as easy as making a call with this MakeCallType -- but then how would you choose to Coach vs Barge?
Thanks for your help!
Jeff
#Integrations