Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: oceanblue on June 15, 2020, 05:19:58 PM

Title: MessageHandler unable to get EventAck from the Interaction Server
Post by: oceanblue on June 15, 2020, 05:19:58 PM
To all OpenMedia PSDK Experts :

I am trying to let the MessageHandler in my code to intercept the corresponding "[b]EventAck[/b]" event after connecting to the IXNServer without any success. I need to be able to have access to the [b]EventAck[/b] to get the [b]ProxyClientID[/b] info, so that, I can use it to other requests, such as, "RequestAgentState", "RequestAgentLogout" etc.

Following snippet is taken from my script :

-----------------------------------------------------------------------------------------
InteractionServerProtocol.setMessageHandler(new ReceivedMessageHandler())

InteractionServerProtocol.setClientName("ixnClient");
InteractionServerProtocol.setClientType(InteractionClient.AgentApplication);


private class ReceivedMessageHandler implements MessageHandler {

        public void onMessage(Message message) {

        switch(message.messageId()) {

                          case EventAck.ID:

                              System.out.println("\n" + message.toString());
                              EventAck _evAck = (EventAck)message;
                              _prxyClntID = _evAck.getProxyClientId();
                                  System.out.println("\n Proxy Client ID" + _prxyClntID);

                          break;

                          default:
                                System.out.println("Unsolicited event: \n" + message.toString());

        }
      }

  }
------------------------------------------------------------------------------

When I execute the code, I do see the following in the IXNServer log :

------------------------------------------------------------------------------

16:41:30.376 Trc 26015 Received message 'RequestRegisterClient' ('100') from client '[no name]' - Unknown:377343:59, message attributes:
                attr_client_name [str] = "ixnClient"
                attr_client_type [int] = 2 [AGENT APPLICATION]
                attr_ref_id [int] = 1

16:41:30.376 Trc 26102 New agent application registered, client 377343:59, name: ixnClient
16:41:30.376 Trc 26016 Sending message 'EventAck' ('125') to client 'ixnClient' - Agent application:377343:59, message attributes:
                attr_ref_id [int] = 1
                attr_prxy_client_id [int] = 377343
                attr_extension [list, size (unpacked)=187] =
                  'ApplicationName' [str] = "Genesys Interaction Server"
                  'ServerVersion' [str] = "8.5.107.22"
                  'ServerVersionFamily' [int] = 8
                  'ServerVersionMajor' [int] = 5
                  'ServerVersionMinor' [int] = 107
                  'ServerVersionBuild' [int] = 22

----------------------------------------------------------------------

I expect the EventAck to come across and the MessageHandler should be able to parse it to get the desired data. However, it never happens.

The same Message Handler code works just fine with the Voice Media, and it gets the "[b]EventLinkConnected[/b]" immediately.

I don't know what I am missing here for the Interaction Server.

I will really appreciate your help.

Kind Regards,
Title: Re: MessageHandler unable to get EventAck from the Interaction Server
Post by: Ardim on July 26, 2021, 12:22:49 PM
We are facing the same problem. Did you manage to find a solution ?
Title: Re: MessageHandler unable to get EventAck from the Interaction Server
Post by: PeteHoyle on August 17, 2021, 01:11:41 PM

It could depend on if you are sending the RequestRegisterClient synchronously or asynchronously...

[url=https://docs.genesys.com/Documentation/PSDK/9.0.x/Developer/EventHandling]https://docs.genesys.com/Documentation/PSDK/9.0.x/Developer/EventHandling[/url]

Below is an example of sending the RequestRegisterClient synchronously, and how to handle the response..

[code]
            RequestRegisterClient reqClient = RequestRegisterClient.Create(InteractionClient.AgentApplication, employee_id);
            IMessage responseRegister = protcol.Request(reqClient);
            int proxyClientId = -1;
            if (responseRegister is EventAck)
            {
                EventAck ack = (EventAck)responseRegister;
                proxyClientId = ack.ProxyClientId;
            }
[/code]
Title: -
Post by: Michaeltob on February 17, 2022, 12:21:04 AM
how to get the code source of weberp pls??

I need to make changes on the application pls any help will appreaciated...

How to get the base of the application, then i will add the feature i need for my degree project

Thanks
Title: Re: MessageHandler unable to get EventAck from the Interaction Server
Post by: Kubig on February 17, 2022, 07:44:29 AM
Could you more elaborate your needs to better understanding and providing best match solution
Title: Re: MessageHandler unable to get EventAck from the Interaction Server
Post by: cavagnaro on February 17, 2022, 04:08:09 PM
I think it is spam...not sure...these days bots are sometimes so random lol