Author Topic: Programatic wrapup  (Read 2240 times)

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Programatic wrapup
« on: April 13, 2019, 03:39:55 PM »
I tried to do the programmatic wrapup by using Platform SDK, I can do wrap up when the call is on active by using this below code:

==================================================================================
Genesyslab.Platform.Commons.Collections.KeyValueCollection keyValueCollectionUpDate = new Genesyslab.Platform.Commons.Collections.KeyValueCollection();
                    keyValueCollectionUpDate.Add("Business Result", "Platform: Business Result");
                    keyValueCollectionUpDate.Add("StrAttribute1", "AttachedData.Business Result");
                    Genesyslab.Platform.Voice.Protocols.TServer.Requests.Userdata.RequestAttachUserData requestAttachUserData =
                    Genesyslab.Platform.Voice.Protocols.TServer.Requests.Userdata.RequestAttachUserData.Create("7012", GetConnectionID(ExtractedArtributes[1][0].Value.ToString()), keyValueCollectionUpDate);
                   
                    Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent2 = tserverProtocol.Request(requestAttachUserData);
====================================================================================

But the problem is after that I tried to add userdata attribute to the call after call was release but it does not working.
====================================================================================
Genesyslab.Platform.Voice.Protocols.TServer.Requests.Special.RequestDistributeUserEvent reqDistributeUserEvent =
                Genesyslab.Platform.Voice.Protocols.TServer.Requests.Special.RequestDistributeUserEvent.Create();
            reqDistributeUserEvent.CommunicationDN = "7012";//your DN number in string format
            Genesyslab.Platform.Voice.Protocols.TServer.CommonProperties  commonProperties = Genesyslab.Platform.Voice.Protocols.TServer.CommonProperties.Create();
            commonProperties.CallID = 16777222;
            Genesyslab.Platform.Commons.Collections.KeyValueCollection keyValueCollection = new Genesyslab.Platform.Commons.Collections.KeyValueCollection();
            keyValueCollection.Add("Business Result", "Platform: Business ResultABCXYZ");
            commonProperties.UserData = keyValueCollection;
            reqDistributeUserEvent.UserEvent = commonProperties;
            Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent2 = tserverProtocol.Request(reqDistributeUserEvent);
====================================================================================

Please help about the add userdata to call object after the call was released.

Thank you
« Last Edit: April 13, 2019, 04:06:10 PM by jkaewprateep »