Author Message
danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
I can't for the life of me get "Set Agent State" to work. Here's what I'm trying. I Start Appl Session, then Get Dev. ID then Register Terminal. Everything looks good, I can take the phone off hook and press buttons on the phone. When I try to Set Agent State I get the following message no matter what options I choose.

Set Agent State Response:171 Error:<?xml version="1.0" encoding="UTF-8"?><CSTAErrorCode xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3"><operation>invalidParameterValue</operation></CSTAErrorCode>

The XML passed looks like this:
Outgoing XML 177
<?xml version="1.0" encoding="utf-8"?>
<SetAgentState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<device typeOfNumber="other" mediaClass="notKnown">10302:swlink1:0.0.0.0:0</device>
<requestedAgentState>loggedOn</requestedAgentState>
<agentID>46988</agentID>
<extensions>
<privateData>
<private>
<SetAgentStatePrivateData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.avaya.com/csta">
<workMode>autoIn</workMode>
</SetAgentStatePrivateData>
</private>
</privateData>
</extensions>
</SetAgentState>

Does any have any ideas?

TIA,
-DCB
danbacon
Joined: Mar 5, 2013
Messages: 5
Offline
I just got this working. Here's the trick for anyone else having this issue. First, if you don't have a password set for the agentID you still need to send the password, just leave the value blank. Second, you have to pass in a Group ID. Even though it shows as optional it's mandatory (I think this is fixed in 6.2, I'm on 6.1). I used group ID 2011.
JohnBiggs
Joined: Jun 20, 2005
Messages: 1135
Location: Rural, Virginia
Offline
Using the DMCC Dashboard, and observing the exceptions on the AE Services server in /opt/mvap/logs/dmcc-trace.log.0 I was able to ultimately get things to work.

I found it odd I had to send a null password for the agent and a null group... If I did not include these tags in the request, the AES rejected the request.

--------------------
Outgoing XML 7
<?xml version="1.0" encoding="utf-8"?>
<SetAgentState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<device typeOfNumber="other" mediaClass="notKnown">32001:greenwitch::0</device>
<requestedAgentState>loggedOn</requestedAgentState>
<agentID>50001</agentID>
<password></password>
<extensions>
<privateData>
<private>
<SetAgentStatePrivateData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.avaya.com/csta">
<workMode>manualIn</workMode>
</SetAgentStatePrivateData>
</private>
</privateData>
</extensions>
</SetAgentState>
-----------------------
Incoming XML 7
<?xml version="1.0" encoding="UTF-8"?>
<SetAgentStateResponse xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3">
<extensions>
<privateData>
<private>
<SetAgentStateResponsePrivateData xmlns:ns1="http://www.avaya.com/csta" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SetAgentStateResponsePrivateData">
<isPending>false</isPending>
</SetAgentStateResponsePrivateData>
</private>
</privateData>
</extensions>
</SetAgentStateResponse>
JohnBiggs
Joined: Jun 20, 2005
Messages: 1135
Location: Rural, Virginia
Offline
I am playing with AEServices 6.2
password still acts mandatory from a XML tag perspective, but group is optional (note it is missing from my example below).
JohnBiggs
Joined: Jun 20, 2005
Messages: 1135
Location: Rural, Virginia
Offline
PS you needn't register the device to get this to work.. By registering the device you consume a DMCC license. setAgentState is a TSAPI based service and by itself it does not need a DMCC License.
Go to:   
Mobile view