Author Topic: How to list Interaction using Platform SDK?  (Read 4217 times)

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
How to list Interaction using Platform SDK?
« on: April 04, 2019, 04:15:56 AM »
Hi, I tried to use the only Platform SDK to list Interaction from a group of agent or device and set disposition to the retrieved interaction.

My Questions are
1. Without the using of extension module, how do I retrieve a list of Interaction or a list of Interaction Id?
2. If it is possible, do I need to create a superuser for this task?
3. If this program is monitoring call and set the call disposition to the agent's interaction, do the agent automatically logoff?

Note: I tried to follow the document and example but what I found is the extension module, but for my application purpose is to centralize the workload.
 ???  ???  ???
เด็กเอ๋ยเด็กดีนั้นมีหน้าที่สิบอย่างด้วยกัน

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: How to list Interaction using Platform SDK?
« Reply #1 on: April 04, 2019, 08:00:42 AM »
1. Do I need to write a program to monitor call establish event or just use one of these event?
2. Which event should be use?

private void TserverProtocol_Received(object sender, EventArgs e)
        {
            Genesyslab.Platform.Commons.Protocols.MessageEventArgs messageEventArgs = (Genesyslab.Platform.Commons.Protocols.MessageEventArgs)e;
            switch (messageEventArgs.Message.Id)
            {
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventEstablished.MessageId:
                    break;
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.CallMonitoring.EventCallPartyAdded.MessageId:
                    break;
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.CallMonitoring.EventCallCreated.MessageId:
                    break;
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventCallInfoChanged.MessageId:
                    break;
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventMonitoringNextCall.MessageId:
                    break;
                default:
                    break;
            }
        }
เด็กเอ๋ยเด็กดีนั้นมีหน้าที่สิบอย่างด้วยกัน

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: How to list Interaction using Platform SDK?
« Reply #2 on: April 04, 2019, 08:26:03 AM »
What different between using Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall and tserverProtocol.Received += TserverProtocol_Received; Genesyslab.Platform.Voice.Protocols.TServer.Events.EventEstablished?

            var tserverConfig = new Genesyslab.Platform.Commons.Connection.Configuration.PropertyConfiguration();
            tserverConfig.UseAddp = true;
            tserverConfig.AddpServerTimeout = 10;
            tserverConfig.AddpClientTimeout = 10;
            tserverConfig.AddpTrace = "both";

            var tserverEndpoint = new Genesyslab.Platform.Commons.Protocols.Endpoint("T-Server", TServerHost, TServerPort, tserverConfig);
            var tserverProtocol = new Genesyslab.Platform.Voice.Protocols.TServerProtocol(tserverEndpoint);

            tserverProtocol.Open();

            Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall requestQueryCall =
                Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall.Create();

            Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent = tserverProtocol.Request(requestQueryCall);

            switch (respondingEvent.Id)
            {
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventPartyAdded.MessageId:
                    break;
                case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventPartyChanged.MessageId:
                    break;
                default:
                    break;
            }
เด็กเอ๋ยเด็กดีนั้นมีหน้าที่สิบอย่างด้วยกัน