" /> Agent Status EventAgentNotReady - Genesys CTI User Forum

Author Topic: Agent Status EventAgentNotReady  (Read 3344 times)

Offline Jabba

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Agent Status EventAgentNotReady
« on: May 14, 2018, 12:08:49 PM »
Advertisement
Hi there :)

I'm new to Genesys and I'm stuck with the setNotReady method for my agent...
I'm trying to set my agent on a state where he can't receive calls but I'm having this error :

[code]2018-05-14 14:02:34,696 -  -  -  -  -  -  - message from SetNotReady'EventError' (52) attributes:
AttributeReferenceID [int] = 6
AttributeThisQueue [str] = "Files_AGE"
AttributeClientID [int] = 586
AttributeThisDN [str] = "938001"
AttributeErrorCode [int] = 185
AttributeErrorMessage [str] = "Set is in wrong state for invocation"
AttributeAgentWorkMode [int] = 3 [AfterCallWork]
AttributeEventSequenceNumber [long] = 30263
TimeStamp:
AttributeTimeinSecs [int] = 1526299353
AttributeTimeinuSecs [int] = 936000
[/code]

Here is my method :

[code]
public void setNotReady(String dn, String queue) {
        RequestAgentNotReady request = RequestAgentNotReady.create(dn, AgentWorkMode.AfterCallWork,
                queue, null, null);
        try {
            tServerProtocol.requestAsync(request, this, new CompletionHandler<Message, Object>() {

                public void completed(Message message, Object obj) {
                    logger.info("AgentProcessor -> setNotReady() -> dn " + dn + " OK");
                    logger.info("message from SetNotReady" + message);
                    if (EventAgentNotReady.ID == message.messageId())
                        agent.setReady(false);
                    else
                        logger.info("AgentProcessor -> setNotReady() -> EventAgentNotReady: "
                                + EventAgentNotReady.ID
                                + " vs "
                                + message.messageId());
                }

                public void failed(Throwable arg0, Object obj) {
                    logger.error("AgentProcessor -> setNotReady() failed -> dn " + dn, arg0);
                }
            });
        } catch (Throwable e) {
            logger.error("AgentProcessor -> setNotReady() -> dn " + dn + " FAILED", e);
        }
    }
[/code]

Is there a simple way to set an agent in this state ? :)
I've searched the forum but I didn't find my answer.

Thank you !

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Agent Status EventAgentNotReady
« Reply #1 on: May 15, 2018, 04:35:04 AM »
What PBX/switch are you using?  From what status you are trying to change the status to the ACW?

Odesláno z mého D5803 pomocí Tapatalk


Offline Jabba

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #2 on: May 15, 2018, 07:37:50 AM »
Hello Kubig,

I'll assume that the initial status is set at the login step ?
Here is my code :

[code] public void login(String dn, String queue) {
        RequestAgentLogin requestAgentLogin = RequestAgentLogin.create(dn, AgentWorkMode.AutoIn);
        requestAgentLogin.setThisQueue(queue);
        try {
            Message response = tServerProtocol.request(requestAgentLogin);
            logger.info("AgentProcessor -> login() -> Utilisateur " + dn + " OK");
            agent.setLoggedIn(true);

        } catch (ProtocolException e) {
            logger.error("AgentProcessor -> login() -> Impossibler de logger le dn = " + dn, e);
        }
    }[/code]

The people in charge of the genesys server tells me that it's a SIP Server (pure application) which I doubt is specific enough for you ?
Here is a screenshot :
[url=https://ibb.co/bRhhDy][img]https://preview.ibb.co/mxgymJ/10150A0F.png[/img][/url]

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Agent Status EventAgentNotReady
« Reply #3 on: May 15, 2018, 08:21:38 PM »
Is your agent talking while doing this action?

Enviado de meu E6633 usando o Tapatalk


Offline Jabba

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #4 on: May 16, 2018, 07:49:57 AM »
Hello cavagnaro,

No, the agent is not talking.
Also, I have the same error when I use the setReady method :

[code] public void setReady(String dn, String queue) {
        RequestAgentReady request = RequestAgentReady.create(dn, AgentWorkMode.AutoIn, queue,
                null, null);
        try {
            tServerProtocol.requestAsync(request, this, new CompletionHandler<Message, Object>() {

                public void completed(Message message, Object obj) {
                    logger.info("AgentProcessor -> setReady() -> dn " + dn + " OK");
                    if (EventAgentReady.ID == message.messageId())
                        agent.setReady(true);
                    else
                        logger.error("AgentProcessor -> setReady() -> dn " + dn + " FAILED", message, obj);
                }

                public void failed(Throwable arg0, Object obj) {
                    logger.error("AgentProcessor -> setReady() -> dn " + dn + " FAILED", arg0, obj);
                }
            });
        } catch (Throwable e) {
            logger.error("AgentProcessor -> setReady() -> dn " + dn + " FAILED", e);
        }
    }[/code]

Thank you :)

Offline Amy

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #5 on: May 16, 2018, 12:52:08 PM »
Hi ,

try to create your requests like this :

  [b]RequestAgentReady ready = RequestAgentReady.create();
            ready.setThisDN(dn);[/b]
(you can set any Other attribute you want)

and then send it :

[b] protocolManager.getProtocol("VoiceConnection").send(ready);[/b]
where
mProtocolManager is an instance of  [b]ProtocolManagementServiceImpl[/b]

Offline Jabba

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #6 on: May 17, 2018, 07:12:29 AM »
Hello Amy,

ProtocolManagementService is deprecated :(

Any other idea ? :)

Thank you,

Offline Amy

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #7 on: May 17, 2018, 09:25:15 AM »

Which version are you using?

I am using PSDK 8.1 and it's not deprecated

Offline Jabba

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #8 on: May 17, 2018, 09:44:30 AM »
PSDK 9 :)

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Agent Status EventAgentNotReady
« Reply #9 on: May 21, 2018, 11:31:14 AM »
Just to make sure, are you specifying the correct DN in the Request?

Can you provide the SIP Server logs that show the login request, not ready request and associated error

Offline Jabba

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Agent Status EventAgentNotReady
« Reply #10 on: May 22, 2018, 02:31:06 PM »
Hello PeteHoyle !

Thank you for your reply :)

I finally solved this error. When login my agent, I forgot to set the AgentID :

[code] RequestAgentLogin requestAgentLogin = RequestAgentLogin.create(dn, AgentWorkMode.Unknown);
        requestAgentLogin.setThisQueue(queue);
        requestAgentLogin.setAgentID(id);
        requestAgentLogin.setPassword(password);[/code]
works !

[code]RequestAgentLogin requestAgentLogin = RequestAgentLogin.create(dn, AgentWorkMode.Unknown);
        requestAgentLogin.setThisQueue(queue);
        requestAgentLogin.setPassword(password);[/code]
doesn't work :)

Thanks every one !
One advice : dig into your logs with Kazimir (a log software, easy to use :) )