Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: luchosrock on December 30, 2015, 01:14:06 PM
-
Hi guys,
I'm trying to attach the ReasonCode to the AttributeExtensions on the NotReady Event. I've added the Extensions KeyValueCollection with the ReasonCode to the request but when I informed the event the response doesn't show the KVList i sent, instead it responds AgentSessionID
Please any help on this will be really appreciated. I'm using Genesys 8 SDK for .NET by the way.
Regards,
-
Post your code fragment where you post the attach data together with logs covering the behaviour.
-
Thanks for your quick reply Kubig.
I'm trying to send it as a KeyValueCollection attached to the Extensions attribute
[code]
Dim reqAgentNotReady As RequestAgentNotReady
...
reqAgentNotReady.Extensions = New KeyValueCollection
reqAgentNotReady.Extensions.Add("ReasonCode", reasonCode)
...
Dim response As IMessage
response = Me.protocolManagementService(TServerString).Request(reqAgentNotReady, TimeSpan.FromSeconds(15))
[/code]
But the response received is
[code]
...
Extensions:
(Str) AgentSessionID XXXXXXXXXXXXXXXXXXXXXXXXXX
...
[/code]
As you can see, the Extensions attribute is overriden by another KeyValueCollection ??? :-\
-
And what say logs of T-Server? I suppose you tried to change the status on voice channel
-
What do you mean by changing the status on voice channel? Mi big issue is that on Interaction Workspace this is notified as 'ReasonCode' 'specificreason' just after the AttributeExtensions entry, I'm trying to get to the same output but through the .NET Platform SDK
Is there a caveat that I don't know? I used to inform this by attaching the reason on the the Reasons attribute to the NotReady request sent but now I need to inform it the same way IWS does
-
The AttributeExtensions are used for hardware reason codes based on the swtich will only accept integers only. If you are sending a string in this attribute it won't attach. If you want to send a software reason code as a string you should sent it under AttributeReason. You can test this by putting a integer (i.e. 1) in your test. What you should see, even if you are sending a string, is that the response will comeback with an integer.
-
mduran22 How can I send a hardware reason code through the Platform SDK? What key-value pair should I use?
Let me show you what I receive in response to the RequestAgentNotReady:
[code]
{'EventAgentNotReady' ('76')
message attributes:
AttributeThisDN [str] = "55555"
AttributeReasons [bstr] = KVList:
'Backoffice' [str] = "backoffice"
CallHistory = ComplexClass(CallHistoryInfo):
LastParty = ComplexClass(LastRemoteParty):
FirstParty = ComplexClass(FirstRemoteParty):
AttributeExtensions [bstr] = KVList:
'AgentSessionID' [str] = "XXXXXXXXXXXXXXXXXXX"
AttributeEventSequenceNumber [long] = 1534419427
AttributeAgentID [str] = "112008"
AttributeReferenceID [int] = 6
Time = ComplexClass(TimeStamp):
AttributeTimeinuSecs [int] = 165000
AttributeTimeinSecs [int] = 1452177312
AttributeCustomerID [str] = "Resources"
AttributeAgentWorkMode [int] = 0 [Unknown]
}
[/code]
-
Change the key to "ReasonCode". With software reason codes you can have any string you would like so "backoffice" would be fine.
-
Yeah but how do I set that ReasonCode at the switch level that you mentioned before?
-
If you are trying to change the actual switch aux code in most cases you will need to get this from the whoever administers and sets the not ready reason codes on the switch. You will have to then use this integer in the attributeextensions section with the KVP ReasonCode:[int] that matches the value of the switch code you want to change to. For example on Avaya you could have not ready reason codes 1-9 where 1 is lunch as administered on the Avaya switch. You would then send a requestagentnotready request with the KVP "ReasonCode:1" under attributeextensions to set the agent to Lunch on Avaya.
-
There are switch specific guides for this, for example the One for Avaya specifies to add a keyvaluepair ReasonCode -> integer
to a KeyValueCollection and set it as the extensions of the request, so in theory an integer value should work.
-
Thank you for your responses :)
But how can a desktop application using the .NET Platform SDK inform the ReasonCode as an Extension attribute. I tried sending the integer on my RequestAgentNotReady with no results (at least from my debugger):
[code]
reqAgentNotReady.Extensions = New KeyValueCollection
reqAgentNotReady.Extensions.Add("ReasonCode", reasonCode)
response = Me.protocolManagementService(TServerString).Request(reqAgentNotReady, TimeSpan.FromSeconds(15))
[/code]
My guess is that the ReasonCode should be informed on the response. Is that correct?
-
Your code seems fine, I think that shares the code with the switch, not sure if it should show in the response.
To show the code in the response, you could try adding the "ReasonCode", code pair to the reqAgentNotReady.Reasons as well
you can add to the reqAgentNotReady.Reasons the key "Reason" with the description.
-
Thanks @gstkein, You are right!
I can see now the ReasonCode sent by the desktop application on the SIPServer logs (at least is received by the SIPServer)
If everything works well, I will mark this thread as solved (by changing the topic name to [SOLVED] ..... ahahaha)
Regards,
---
EDIT: I'll mark this as solved since the integration I was looking for worked fine. Thanks to all for your kind help.
-
I´m glad I could help :)