Yes it's a web service which allows other applications ( including web pages) to make a call for an agent.
For some reason ( I guess it's legacy) the requesting client only knows the user name. Here are a few Java snippets
This happens for every get request.
Gets all dn's from the configuration service
[color=red] Protocol pr = pms.getProtocol("cfgserver");
KeyValueCollection filter = new KeyValueCollection();
filter.addInt("dn_type", CfgDNType.CFGExtension.asInteger());[/color]
[color=red]
RequestReadObjects rro = RequestReadObjects.create(
CfgObjectType.CFGDN.asInteger(), filter);[/color]
then for each dn it queries TServer to get the details of that DN.
[color=#ff0000] if (!tsopened) {[/color]
[color=#ff0000] tso2 = initTserverConnection(pms);[/color]
[color=#ff0000] }[/color]
[color=#ff0000] Protocol pr = pms.getProtocol("tserver");[/color] [color=red] RequestQueryAddress rqa = RequestQueryAddress.create(dn,
AddressType.DN, AddressInfoType.DNStatus);[/color]
Then grabs the agentid (after casting response to EventAddressInfo)
[color=red] id = eai.getAgentID()[/color]
and compares this to the username , if it matches then it uses that DN to request make the call.
[color=#ff0000] if (!tsopened) {[/color]
[color=#ff0000] tso2 = initTserverConnection(pms);[/color]
[color=#ff0000] }[/color]
[color=#ff0000] Protocol pr = pms.getProtocol("tserver");[/color]
[color=#ff0000] RequestRegisterAddress rra = RequestRegisterAddress.create(dn,[/color]
[color=#ff0000] RegisterMode.ModeShare, ControlMode.RegisterDefault,[/color]
[color=#ff0000] AddressType.DN);[/color]
[color=#ff0000] RequestMakeCall rmc = RequestMakeCall.create(dn, num,[/color]
[color=#ff0000] MakeCallType.Regular);[/color]
[color=#ff0000] RequestUnregisterAddress rua = RequestUnregisterAddress.create(dn,[/color]
[color=#ff0000] ControlMode.RegisterDefault);[/color]
[color=#ff0000] String message = "";[/color]
[color=#ff0000] try {[/color]
[color=#ff0000] pr.request(rra);[/color]
[color=#ff0000] pr.request(rmc);[/color]
[color=#ff0000] message = "<h3>MakeCall sent successfully</h3>";[/color]
[color=#ff0000] pr.request(rua);[/color]
[color=#ff0000] } catch (ProtocolException e) {[/color]
[color=#ff0000] log.info("WebCaller::makeCall ProtocolException: " + e.getMessage());[/color]
[color=#ff0000] log.error("WebCaller::makeCall", e);[/color]
[color=#ff0000] message = "<h3>ProtocolException</h3>";[/color]
[color=#ff0000] } catch (IllegalStateException e) {[/color]
[color=#ff0000] log.info("WebCaller::makeCall IllegalStateException: "[/color]
[color=#ff0000] + e.getMessage());[/color]
[color=#ff0000] log.error("WebCaller::makeCall", e);[/color]
[color=#ff0000] message = "<h3>IllegalStateException</h3>";[/color]
[color=#ff0000] }[/color]
[color=#ff0000] if (!tsopened && tso2) {[/color]
[color=#ff0000] closeGenesysConnections(false, true, pms);[/color]
[color=#ff0000] }[/color]
So rather than every call having to query every dn in TServer to find the right agent, I was hoping I could have a statistic from Stat server which will norify me of what agent has logged in or out of any DN, or worst case a single process that keeps track of the agents.
Actually I am now wondering if I can use Stat Server and peek a statistic passing the agent id and get the dn. ( or maybe I need to get the db id of the user first). ( I'm thinking out loud here
Many thanks for taking the time
Rob