Author Topic: Programatic wrapup  (Read 138 times)

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Programatic wrapup
« on: April 14, 2019, 12:39:55 AM »
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 14, 2019, 01:06:10 AM by jkaewprateep »
เด็กเอ๋ยเด็กดีนั้นมีหน้าที่สิบอย่างด้วยกัน