Author Topic: WDE connect voice channel  (Read 724 times)

Offline rnelson

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
WDE connect voice channel
« on: August 07, 2019, 09:32:06 PM »
I'm in the process of customizing WDE to start replacing 6 years of development on a custom softphone. Due to the myriad of business rules we have in the in-house phone, we're launching WDE with a custom launcher that launches it with the command line arguments that get everything going and logged in.

When we launch WDE directly, it prompts us for a password a second time to log into the voice channel. If you launch with those arguments, this does not happen. Similar to a manual launch of WDE, our current softphone will log into the config server then turn around and log into T-Server for voice. My goal is to replicate that user experience -- they provide credentials, WDE starts, WDE connects to the config server, then I use those same creds to log into voice.

There are plenty of examples out there of using RequestAgentLogin to log the user into the voice channel, but they all assume you already have a connection to work with. Is there a way to get WDE's connection (e.g., the ProtocolManagementService object) and use that? I did find a container in the ESDK IAgent.EnterpriseService that claims to have a ProtocolManagementService object, but when I try to resolve it, resolution fails.

If necessary, I can pull the configuration information out of a database and spin up new connections, but I'd much prefer to borrow WDE's if possible.

Offline rnelson

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: WDE connect voice channel
« Reply #1 on: August 13, 2019, 09:33:03 PM »
Unable to sort it out, we reached out to Genesys and were told the following:

Higher level API has login/logout methods. For example:

container.Resolve<IAgent>().Login()/LogOff() will login/logout all available medias.

Individual medias have their login/logoff methods. You can access medias from that IAgent instance, e.g. container.Resolve<IAgent>().FirstMediaVoice.

You can get the lower level Platform SDK protocol from a media, e.g. for voice - container.Resolve<IAgent>().FirstMediaVoice.Channel.Protocol

It's important to note that if you access these properties too early in the code (e.g. inside your module's Initialize() method) they might not be yet created/available.

IAgent's FirstMediaVoice was null until I logged in, so that does nothing for me, and Login() failed but shed some light on the underlying problem: our Genesys users and PBX users differ in that Genesys ones have a prefix on the front, and Workspace is attempting to use that prefix on the PBX and failing.

Starting from, I was able to come up with the following to force a login:

Code: [Select]
var agent = container.Resolve<IAgent>();

// If logged in, do nothing
if (!(agent?.FirstMediaVoice?.IsPossibleLogOn ?? true))

var request = RequestAgentLogin.Create("<dn>", AgentWorkMode.Unknown);
request.AgentID = "<PBX user ID>";
request.Password = "<PBX password>";

var channelService = agent.EntrepriseService.Resolve<IChannelService>("channelService");
var tServerChannel = channelService.ListChannels<TServerProtocol>().FirstOrDefault();
var tServerProtocol = tServerChannel.Protocol as TServerProtocol;

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7243
  • Karma: 56330
Re: WDE connect voice channel
« Reply #2 on: August 14, 2019, 03:24:29 AM »
Well...something is wrong with your comments and so...
1. This Genesys is new installation or existing environment?
2. At WDE you login with the user configured at CME/GA Persons and its password, then WDE automatically will login into the voice logins the agent has configured at its configuration.
3. WDE doens't need customization for that to work, be sure to engage someone who knows the platform to avoid redoing coding which is not necessary