Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: cavagnaro on February 04, 2009, 06:32:41 AM
-
Hi guys,
A question, how can I control using platform SDK the login of an agent who doesn't exists on the Framework? Because right now if I put as agent login anything it will allow me to login using emulated agents functionality, however if I disable this function from TServer will affect other areas of the customer and we don't want to lose it.
On ActiveX Desktop Toolkit I was able to use the DoLoginVB, however what is the similar function on this new SDK? I can't find nothing similar. What I expect is to build a similar login to what was used on GCN or any other Genesys application.
Thanks
-
Hi guys,
On another thread i see a guy doing:
tServerProtocol = new ConfServerProtocol(
new Endpoint(
tServerName,
tServerUri));
tServerProtocol.ClientType = ConfServerClientType.ThirdPartyApp;
tServerProtocol.ClientName = "MyService";
tServerProtocol.UserName = "default"; efault";
tServerProtocol.UserPassword = "password";
Will this help me control the login? As long as my application has my Tserver as a connection?
I'd appreciate some guidance.
Thanks
-
Hi Cav,
Do you still need help with this?
If I understand you correctly you would like to write agent desktop application using Platform SDK. Am I right?
R.
-
Yup René,
Genesys has told me to use Framework SDK but I'm still trying to sort this correctly. Do you have any similar implementation or any idea that I could use? Thanks a lot
-
I've never heard about Framework SDK but assume this is just a garbled name of Platform SDK...
Below is sample code showing how to create connection to TServer, register DN and log in an agent. Please please take this code as dummy sample and not a production code. All requests are sent in synchronous mode and there is no event handler in the application at all. I would suggest you to look at application block "MessageBroker" released by Genesys that brings implementation of event handler.
[code]
TServerProtocol tserver = new TServerProtocol(new Endpoint("", "...tserver host...", 3000));
tserver.ClientName = "...tserver client name...";
tserver.Open();
RequestRegisterAddress req = RequestRegisterAddress.Create();
req.AddressType = AddressType.DN;
req.ControlMode = ControlMode.RegisterDefault;
req.ThisDN = "999";
IMessage evnt = tserver.Request(req);
if (evnt.Id == EventRegistered.MessageId)
{
Console.WriteLine("DN has been registered");
}
else
{
Console.WriteLine("Unexpected result. Received message: " + evnt.Name);
}
RequestAgentLogin reqAgIn = RequestAgentLogin.Create();
reqAgIn.AgentID = "111";
reqAgIn.AgentWorkMode = AgentWorkMode.ManualIn;
reqAgIn.ThisDN = "999";
evnt = tserver.Request(reqAgIn);
if (evnt.Id == EventAgentLogin.MessageId)
{
Console.WriteLine("Agent has been logged in");
}
else
{
Console.WriteLine("Unexpected result. Received message: " + evnt.Name);
}
[/code]
-
Late post, but I'm interested to know how you got this implemented.
Whenever I write code to connect to T-Server using the platform SDK, I mostly setup a connection to configration layer to check various info (logging, backup-modes, etc...).
So I would use my config layer connection to check if the agent actually exists.
But like I said, I would like to hear from you how you managed this...
-
Hehe, well I told them:
1. You code the validation (with Rene example) or do something (like your idea) and I will not help further (too much time lost) and you explain big heads the reason of delay
2. You live with that and we go on production as we are as all other productions are and we accomplish the dates approved
Guess which option he choose ;)
-
I tried the code but i keep losing connection (state = Closed from open) when ever it does RequestRegisterAddress call; why?
Code:-
TServerProtocol tserver = new TServerProtocol(new Endpoint("TserverListener_PsdkClient", "10.10.10.10", 3000));
tserver.ClientName = "TserverListener_PsdkClient";
tserver.Open();
while(tserver.State != ChannelState.Opened)
{
;
}
RequestRegisterAddress req = RequestRegisterAddress.Create();
req.AddressType = AddressType.DN;
req.ControlMode = ControlMode.RegisterDefault;
req.ThisDN = "1234567890";
IMessage evnt = tserver.Request(req); //losing connection here - why?
if (evnt.Id == EventRegistered.MessageId)
{
Console.WriteLine("DN has been registered");
}
else
{
Console.WriteLine("Unexpected result. Received message: " + evnt.Name);
}