Jabba
May 14, 2018, 12:08pm
1
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 :
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
Here is my method :
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);
}
}
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 !
Kubig
May 15, 2018, 4:35am
2
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
Jabba
May 15, 2018, 7:37am
3
Hello Kubig,
I’ll assume that the initial status is set at the login step ?
Here is my 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);
}
}
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 :
https://preview.ibb.co/mxgymJ/10150A0F.png
Is your agent talking while doing this action?
Enviado de meu E6633 usando o Tapatalk
Jabba
May 16, 2018, 7:49am
5
Hello cavagnaro,
No, the agent is not talking.
Also, I have the same error when I use the setReady method :
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);
}
}
Thank you
CCS
May 16, 2018, 12:52pm
6
Hi ,
try to create your requests like this :
RequestAgentReady ready = RequestAgentReady.create();
ready.setThisDN(dn);
(you can set any Other attribute you want)
and then send it :
protocolManager.getProtocol(“VoiceConnection”).send(ready);
where
mProtocolManager is an instance of ProtocolManagementServiceImpl
Jabba
May 17, 2018, 7:12am
7
Hello Amy,
ProtocolManagementService is deprecated
Any other idea ?
Thank you,
CCS
May 17, 2018, 9:25am
8
Which version are you using?
I am using PSDK 8.1 and it’s not deprecated
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
Jabba
May 22, 2018, 2:31pm
11
Hello PeteHoyle !
Thank you for your reply
I finally solved this error. When login my agent, I forgot to set the AgentID :
RequestAgentLogin requestAgentLogin = RequestAgentLogin.create(dn, AgentWorkMode.Unknown);
requestAgentLogin.setThisQueue(queue);
requestAgentLogin.setAgentID(id);
requestAgentLogin.setPassword(password);
works !
RequestAgentLogin requestAgentLogin = RequestAgentLogin.create(dn, AgentWorkMode.Unknown);
requestAgentLogin.setThisQueue(queue);
requestAgentLogin.setPassword(password);
doesn’t work
Thanks every one !
One advice : dig into your logs with Kazimir (a log software, easy to use )