Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Tobe on March 06, 2017, 09:25:33 AM
-
HI,
I'm new to genesys and have struggles with SolutionControlServerProtocol. So far i wasn't able to find anything except for this: [url=http://www.sggu.com/smf/index.php?topic=2698]http://www.sggu.com/smf/index.php?topic=2698[/url]
My Goal:
So my goal is to connect to Solution Control Server and get a few informations like; what is the current "Status", which "Mode" is it running, etc.
What I have:
So far i have tried a few different things, the most successful two are the following:
Best solution (so far):
string server = "tco://sisccpxxxx01:9201";
TimeSpan timeout = new TimeSpan(0, 0, 0, 0, 3000);
SolutionControlServerProtocol scsp = new SolutionControlServerProtocol(new Endpoint(new Uri(server)));
scsp.ClientName = "SomeName_Main";
scsp.ClientType = Genesyslab.Platform.Management.Protocols.SolutionControlServer.ControlObjectType.Solution;
scsp.Open(timeout);
I get the following error:
Genesyslab.Platform.Commons.Protocols.ProtocolException: Exception occured duing channel opening ---> System.Net.Sockets.Socket.Exception: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.238.xxx.xxx:9201 TRANSLATET (There is no connection because the target computer refused the connection).
I'm guessing the problem is that I don't give a id (scsp.ClientId), sadly I don't now what the id is and where i get it from. Can you help me out?
2nd solution (Like post I linked):
TimeSpan timeout = new TimeSpan(0, 0, 0, 0, 3000);
Endpoint endpoint = new Endpoint(name, host, port);
SolutionControlServerProtocol scsp = new SolutionControlServerProtocol(endpoint);
scsp.Open(timeout);
I get the following error:
Genesyslab.Platform.Commons.Protocols.ProtocolException: Exception occured duing channel opening ---> System.Net.Sockets.Socket.Exception: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.238.xxx.xxx:9201 TRANSLATET (There is no connection because the target computer refused the connection).
Same error as above.
What am I missing? Thank you for any help!
Version: 8.1.1.1211.00
Regards
-
One possible reason could be that you have a spelling mistake on your server string..
[code]string server = "tco://sisccpxxxx01:9201";[/code]
It should be 'tcp://' not 'tco://'.
Other things it could be:
Is the SCS Port opened on your firewall.
Can the host name be resolved to an IP Address?
Do you have the correct port number?
For me this code works:
[code]try
{
string server = "tcp://demosrv:7003";
SolutionControlServerProtocol protocol = new SolutionControlServerProtocol(new Endpoint(new Uri(server)));
protocol.Open();
RequestGetApplicationInfo req = RequestGetApplicationInfo.Create();
req.ControlObjectId = 117;
IMessage res = protocol.Request(req);
if(res is EventInfo)
{
EventInfo info = res as EventInfo;
Console.WriteLine("Status: " + info.ControlStatus);//6 = Running
}
Console.WriteLine(res);
}
catch(Exception ex)
{
Console.WriteLine("Error :", ex);
}[/code]
-
Hi,
First of all sorry for my late response, was busy the past few days. Then I'm thankful for your response!
I've tried what you send me and it looks better, yet still doesn't work. The problem I get is still at [i]protocol.Open();[/i], but now I get a different error:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
So it looks better but I'm still missing something, do you know what?
string server = "tcp://sisctestsrv01:9201";
SolutionControlServerProtocol protocol = new SolutionControlServerProtocol(new Endpoint(new Uri(server)));
protocol.Open();
RequestGetApplicationInfo req = RequestGetApplicationInfo.Create();
req.ControlObjectId = 117;
IMessage res = protocol.Request(req);
if (res is EventInfo)
{
EventInfo info = res as EventInfo;
Console.WriteLine("Status: " + info.ControlStatus);
}
Regards
-
Are you sure about the SCS port (9201)?
-
[quote author=Kubig link=topic=10189.msg46274#msg46274 date=1489054079]
Are you sure about the SCS port (9201)?
[/quote]
Yes I'm pretty sure, tried it with 2020 which got me same error. Got the information through SCI, is there an other way how i could find out which port I should use?
-
Please,share screenshot of SCS server setting tab.
-
[url=http://prnt.sc/ehttsa]http://prnt.sc/ehttsa[/url]
-
You testing on Lan or over a Vpn or something similar? If you ping the server do you have a steady connection or packets dropping and high latency?
Enviado de meu E6633 usando Tapatalk
-
[quote author=cavagnaro link=topic=10189.msg46281#msg46281 date=1489063609]
You testing on Lan or over a Vpn or something similar? If you ping the server do you have a steady connection or packets dropping and high latency?
[/quote]
Lan with steady connection..
-
Can you telnet that port from your Pc?
Telnet server port
Enviado de meu E6633 usando Tapatalk
-
The screenshot you have sent shows that Application Name 'Pulse' of type 'DataSourcer' is using port 9201. That will be why you can't connect using the SolutionControlServerProtocol.
Do you know what the port number for your Solution Control Server is ? That would be an application of type 'Solution Control Server'
-
[quote author=PeteHoyle link=topic=10189.msg46291#msg46291 date=1489068631]
The screenshot you have sent shows that Application Name 'Pulse' of type 'DataSourcer' is using port 9201. That will be why you can't connect using the SolutionControlServerProtocol.
Do you know what the port number for your Solution Control Server is ? That would be an application of type 'Solution Control Server'
[/quote]
:-X :-X lmao
-
Oh I'm actually dumb. *facepalm*
I'm trying to get the informations from a application [u]on[/u] a SCS, not the SCS itself. That explains alot, have to do this differently.
Thanks for you help guys and sorry that i wasted your time... :-[