额外说明:
呼叫详细信息:特别是我想为给定的呼叫获取AgentId
和
从Sip Server:我不确定Sip Server是否是接听电话详情的最佳人选。对其他建议/备选方案持开放态度
您可以构建一个监视DN操作的类。您还可以根据自己的需要观看特定DN或所有DN。如果这一切都与呼叫有关,那么这是最好的方法。
首先,您必须定义TServerProtocol,然后必须通过主机,端口和客户端信息进行连接。
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();
我总是使用异步方式来做到这一点。我得到了你的理由:)你可以检测到什么时候连接打开与SDK提供的事件。
protocol.Opened += new EventHandler(OnProtocolOpened);
protocol.Closed += new EventHandler(OnProtocolClosed);
protocol.Received += new EventHandler(OnMessageReceived);
protocol.Error += new EventHandler(OnProtocolError);
这里有OnMessageReceived事件。魔术发生的这个事件。您可以跟踪所有呼叫事件和DN操作。如果你去geneys支持网站。您将找到SDK参考手册。在那个手册上,很容易理解有很多关于参考和使用的信息。所以在你的情况下,你想要一个电话的agentid。所以你需要EventEstablished才能做到这一点。您可以在接收活动中使用此功能;
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;
}
这种用法可以解决很多问题。就像拨号,保持呼入入站或出站,即使你可以检测到内部呼叫并报告geneys平台没有。
我希望这很清楚。
如果您有权访问路由策略,则可以对其进行编辑。您可以向策略添加一些代码,以便将您需要的详细信息发送到某个Web服务器(例如)或DB。我们在战略中做了这样的事情。成功路由块后,作为后路由策略发送RTargetPlaceSelected和RTargetAgentSelected的值。
试试这个:
>
Genesyslab.Platform.Contacts.Protocols.ContactServer.Requests.JirayuGetInteractionContent JirayuGetInteractionContent = Genesyslab.Platform.Contacts.Protocols.ContactServer.Requests.JirayuGetInteractionContent.Create();
JirayuGetInteractionContent.InteractionId =“004N4aEB63TK000P”; Genesyslab.Platform.Commons.Protocols.IMessage respondEventY = contactserverProtocol.Request(JirayuGetInteractionContent); Genesyslab.Platform.Commons.Collections.KeyValueCollection keyValueCollection =((Genesyslab.Platform.Contacts.Protocols.ContactServer.Events.EventGetInteractionContent)respondEventY).InteractionAttributes.AllAttributes;