Genesys Platform : Get Call Details From Sip Server

一笑奈何 提交于 2019-12-08 02:53:34

问题


  • I want to get Call Details from Genesys Platform SIP Server.

  • And Genesys Platform has Platform SDK for .NET .

  • Anybod has a SIMPLE sample code which shows how to get call details using Platform SDK for .NET [ C# ] from SIP Server?

Extra Notes:

Call Details : especially i wanted to get AgentId for a given call

and

From Sip Server : I am not sure if Sip Server is the best candiate to take call details. So open to other suggestions/ alternatives


回答1:


You can build a class that monitor DN actions. Also you watch specific DN or all DN depending what you had to done. If its all about the call, this is the best way to this.

Firstly, you must define a TServerProtocol, then you must connect via host,port and client info.

           var endpoint = new Endpoint(host, port, config);
            //Endpoint backupEndpoint = new Endpoint("", 0, config);

            protocol = new TServerProtocol(endpoint)
            {
                ClientName = clientName
            };
//Sync. way;
    protocol.Open();
//Async way;
    protocol.BeginOpen();

I always use async way to do this. I got my reason thou :) You can detect when connection open with event that provided by SDK.

            protocol.Opened += new EventHandler(OnProtocolOpened);
            protocol.Closed += new EventHandler(OnProtocolClosed);
            protocol.Received += new EventHandler(OnMessageReceived);
            protocol.Error += new EventHandler(OnProtocolError);

Here there is OnMessageReceived event. This event where the magic happens. You can track all of your call events and DN actions. If you go genesys support site. You'll gonna find a SDK reference manual. On that manual quiet easy to understand there lot of information about references and usage. So in your case, you want agentid for a call. So you need EventEstablished to do this. You can use this in your recieve event;

var message = ((MessageEventArgs)e).Message;

            // your event-handling code goes here
            switch (message.Id)
            {
                    case EventEstablished.MessageId:
                    var eventEstablished = message as EventEstablished;
                    var AgentID = eventEstablished.AgentID;
                    break;
            }

You can lot of this with this usage. Like dialing, holding on a call inbound or outbound even you can detect internal calls and reporting that genesys platform don't.

I hope this is clear enough.




回答2:


If you have access to routing strategy and you can edit it. You can add some code to strategy to send the details you need to some web server (for example) or to DB. We do such kind of stuff in our strategy. After successful routing block as a post routing strategy sends values of RTargetPlaceSelected and RTargetAgentSelected.




回答3:


Try this:

>

Genesyslab.Platform.Contacts.Protocols.ContactServer.Requests.JirayuGetInteractionContent JirayuGetInteractionContent = Genesyslab.Platform.Contacts.Protocols.ContactServer.Requests.JirayuGetInteractionContent.Create();

JirayuGetInteractionContent.InteractionId = "004N4aEB63TK000P"; Genesyslab.Platform.Commons.Protocols.IMessage respondingEventY = contactserverProtocol.Request(JirayuGetInteractionContent); Genesyslab.Platform.Commons.Collections.KeyValueCollection keyValueCollection = ((Genesyslab.Platform.Contacts.Protocols.ContactServer.Events.EventGetInteractionContent)respondingEventY).InteractionAttributes.AllAttributes;



来源:https://stackoverflow.com/questions/29848589/genesys-platform-get-call-details-from-sip-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!