Genesys Engage on-premises

 View Only

Discussion Thread View
Expand all | Collapse all

Unable to connect with stat server with PSDK

  • 1.  Unable to connect with stat server with PSDK

    Posted 02-19-2019 05:03
    Hi team,
    I need to get the stat server statistics from platfrom sdk .working on .Net.
    try to connect with Stat server first but unable to connect to the stat server.

    StatServerProtocol statServerProtocol = new StatServerProtocol(new Endpoint("routing_statsrv_p", "10.4.2.1", 7004));
    statServerProtocol.ClientId = clientID;
    statServerProtocol.ClientName = clientName;
    statServerProtocol.Open();

    what would be clientid and clientname.

    Regards,

    #Integrations

    ------------------------------
    DEEPTI SRIVASTAVA
    AGC networks Australia Pty Ltd
    ------------------------------


  • 2.  RE: Unable to connect with stat server with PSDK

    Posted 02-20-2019 03:11
    Hi,

    I suggest to connect statserver using :

    IStatServerService statService = _container.Resolve<IStatServerService>();
    GenesysStatisticServer statManager = new GenesysStatisticServer(statService.ProtocolStatServer as StatServerProtocol);​

    With _container as an IObjectContainer passed in parameter of your .Net VS module (injection).


    ------------------------------
    Nicolas
    ------------------------------



  • 3.  RE: Unable to connect with stat server with PSDK

    GENESYS
    Posted 02-20-2019 11:19
    Deepti,

    This works for me in C#:

                statProtocol = new StatServerProtocol(statServerEndPoint);
                statProtocol.Opened += StatProtocol_Opened;
                statProtocol.Closed += StatProtocol_Closed;
                statProtocol.Received += StatProtocol_Received;

                statProtocol.ClientName = application.appName;
                statProtocol.Open();

    The ClientId isn't required.  ClientName is only used for logging/debugging purposes so that you can see it in the Stat Server log file.

    If you are having trouble connecting to stat server, then I'd verify the IP address and port.  I'd also suggest looking at the Stat Server log file to see if there is any error being reported.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 4.  RE: Unable to connect with stat server with PSDK

    GENESYS
    Posted 02-20-2019 11:28
    One additional thing...  I feel that in your endpoint you are specifying the IP address, but I think the Endpoint object wants a host name for DNS resolution.  If you want to use IP address you may have to use the Endpoint(Uri) constructor instead.  Alternatively you could edit your hosts file and create a hostname for the IP address you want to use, for development purposes.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 5.  RE: Unable to connect with stat server with PSDK

    Posted 02-21-2019 07:33
    Thanks ,now I am able to connect with Stat server via PSDK.
    kindly help me out.

    how to get EWT from statistics .I have tried but EWT is not coming.
    I need to pass it the third party application.

    Regards,

    ------------------------------
    DEEPTI SRIVASTAVA
    AGC networks Australia Pty Ltd
    ------------------------------



  • 6.  RE: Unable to connect with stat server with PSDK

    GENESYS
    Posted 02-21-2019 10:31
    I do not believe that you can obtain EWT, at least not accurate EWT, from Stat Server.  The calculation for EWT takes into account calls in queue, agent availability, interaction priority, and media capacity rules.  Stat Server doesn't have visibility to all of that.

    The EWT statistic is exposed from Genesys Universal Routing Server (URS).  URS has an HTTP listener and exposes an API from which you can query the EWT for a virtual queue directly from URS.  The HTTP listener is not enabled by default, so you'd have to consult the URS deployment guide in order to enable that feature.  Once enabled it is a simple HTTP request to obtain EWT.

    In addition to querying URS directly, you can connect Genesys Mobile Services (GMS) to URS and you can use the GMS Stat APIs to query for EWT.  GMS will act as a more secure proxy (whitelisting, HTTPS, etc) over to URS.

    I would highly recommend that you take the time to configure URS and GMS to work together and obtain EWT via the GMS Stat APIs.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 7.  RE: Unable to connect with stat server with PSDK

    Posted 02-21-2019 10:39
    Jim,

    Does Genesys Widgets have a standard functionality to call EWT via GMS? If so, is there any documentation for this. I couldn't find it last I checked.


    Daniel Hilaire | Sr. Manager, Contact Center Engineering
    Kaplan Higher and Professional Education | 







  • 8.  RE: Unable to connect with stat server with PSDK

    GENESYS
    Posted 02-21-2019 11:19
    Yes, the Widgets use the GMS Stats API exposed via the Widgets StatsService (https://docs.genesys.com/Documentation/GWC/latest/WidgetsAPI/StatsService).  At a higher level the Channel Selector (https://docs.genesys.com/Documentation/GWC/latest/WidgetsAPI/ChannelSelector) uses the StatsService to visually display the EWT for each channel you utilize via the Widgets.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 9.  RE: Unable to connect with stat server with PSDK

    Posted 02-27-2019 06:27
    As per my understanding , it will associated with ORS services.
    our customer don't have Orchestration Server. will URS http API work.

    I have configured http and web port in URS listener ports and created one virtual queue in CM.
    trying to access below URL .but unable to access. 
    http://<URSIP>:<URShttpPort>/urs/help/call/lvq

    kindly suggest , any configuration changes required. will require to make changes in IRD strategy.

    Regards,
    Deepti

    ------------------------------
    DEEPTI SRIVASTAVA
    AGC networks Australia Pty Ltd
    ------------------------------



  • 10.  RE: Unable to connect with stat server with PSDK

    GENESYS
    Posted 02-27-2019 09:35
    I assume that in the URS application object in Genesys configuration that you defined both the soap_port and http_port in the 'http' section of the options or on the Server Info tab, correct?  Per a note in the URS deployment guide (page 209), you must define both ports or URS will not start the HTTP interface.

    Did you also configure the log file settings for the HTTP interface?  It not then I would recommend doing that, setting the logging to highest level, and then checking the log file after you restart URS to assure that the HTTP interface was started and is listening.

    Also, on the Connections tab, you have to add URS to its own connection list because the HTTP interface is a client of URS (see note on page 210 of deployment guide).

    After restarting URS, I'd check the standard URS log file for any error messages, I'd look at the URS HTTP log file for any errors, and I'd run 'netstat' from a command line to make sure that URS is listening on the ports that you defined for soap and http.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 11.  RE: Unable to connect with stat server with PSDK

    Posted 03-04-2019 09:24
    Deepti,
    If URS has been configured, you will be able to fetch the help page from URS web services.

    http://[ipaddress]:[port]/urs/help

    I think Jim was pretty thorough in his advice to get URS configured. Once you get the help page, try using the 'lvq' API. It has an option for 'max' which will return the interaction with the highest values in the skill you specify, as well as the option for using an asterisk in the skill name to return a list of skills and the values of the 'max' interaction.
    Finally, the 'aqt' parameter allows you to pull statistics from stat server or from URS.

    Usage of lvq is in the help pages: http://[ipaddress]:[port]/urs/help/call/lvq (as you mentioned above)

    Consider installing SoapUI as a Restful tool to communicate with URS and test the API responses and structures before plugging it into your code.

    Happy coding!


    ------------------------------
    Todd McCall
    Bank of America
    ------------------------------



  • 12.  RE: Unable to connect with stat server with PSDK

    Posted 03-06-2019 05:12

    Hi Team,

    I have configured http port in URS for http web API.

     

    Getting below :- what is missing to get the EWT.

     

     






  • 13.  RE: Unable to connect with stat server with PSDK

    Posted 03-07-2019 12:45
    I would like to see what you are sending in your soap message​.
    My soap calls to URS look like this:
    http://[ipaddress]:[port]/urs/call/max/lvq?name=CDDesktop*&aqt=stat&tenant=Resources

    Results in JSON format:
    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    Content-Length: 228

    {"CDDesktopPODA":{"time":1551980490,"wt":0,"calls":0,"wcalls":0,"pos":1,"wpos":1,"aqt":10000,"ewt":10000,"hit":66},"CDDesktopPODC":{"time":1551980490,"wt":0,"calls":0,"wcalls":0,"pos":1,"wpos":1,"aqt":10000,"ewt":10000,"hit":0}}

    Also, can you provide feedback on Jim's earlier instructions?
    I assume that in the URS application object in Genesys configuration that you defined both the soap_port and http_port in the 'http' section of the options or on the Server Info tab, correct?  Per a note in the URS deployment guide (page 209), you must define both ports or URS will not start the HTTP interface.

    Did you also configure the log file settings for the HTTP interface?  It not then I would recommend doing that, setting the logging to highest level, and then checking the log file after you restart URS to assure that the HTTP interface was started and is listening.

    Also, on the Connections tab, you have to add URS to its own connection list because the HTTP interface is a client of URS (see note on page 210 of deployment guide).

    After restarting URS, I'd check the standard URS log file for any error messages, I'd look at the URS HTTP log file for any errors, and I'd run 'netstat' from a command line to make sure that URS is listening on the ports that you defined for soap and http.

    ------------------------------
    Todd McCall
    Bank of America
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources