Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Jabba on May 14, 2018, 12:08:49 PM
-
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 !
-
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
-
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]
-
Is your agent talking while doing this action?
Enviado de meu E6633 usando o Tapatalk
-
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 :)
-
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]
-
Hello Amy,
ProtocolManagementService is deprecated :(
Any other idea ? :)
Thank you,
-
Which version are you using?
I am using PSDK 8.1 and it's not deprecated
-
PSDK 9 :)
-
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
-
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 :) )