Botframework 如何获得客户';s lync sdk c中的联系人详细信息#

Botframework 如何获得客户';s lync sdk c中的联系人详细信息#,botframework,lync,skype-for-business,lync-2013,lync-client-sdk,Botframework,Lync,Skype For Business,Lync 2013,Lync Client Sdk,哪个对象具有客户联系信息,如办公室、公司、IM等,。在Lync SDK 2013中?我想知道用户(客户)的位置/地址信息 用户位置/办公室信息可从联系人对象获取,如下所示: LyncClient lyncClient = LyncClient.GetClient(); Contact contact = lyncClient.ContactManager.GetContactByUri("sip:contact@organization.com"); String officeLocation

哪个对象具有客户联系信息,如办公室、公司、IM等,。在Lync SDK 2013中?我想知道用户(客户)的位置/地址信息

用户位置/办公室信息可从联系人对象获取,如下所示:

LyncClient lyncClient = LyncClient.GetClient();
Contact contact = lyncClient.ContactManager.GetContactByUri("sip:contact@organization.com");
String officeLocation = contact.GetContactInformation(ContactInformationType.Office).ToString();

可以使用联系人信息类型(个人说明、公司、地点、部门等)获取更多信息。

除了Kannan的回答之外,从联系人处获取电话号码是不同的,需要做更多的工作。以下是您的操作方法:

LyncClient lyncClient = LyncClient.GetClient();
Contact contact = lyncClient.ContactManager.GetContactByUri("sip:contact@organization.com");

List<object> endPoints = new List<object>();
var telephoneNumber = (List<object>)contact.GetContactInformation(ContactInformationType.ContactEndpoints);
endPoints = telephoneNumber.Where<object>(N => ((ContactEndpoint)N).Type == ContactEndpointType.HomePhone || ((ContactEndpoint)N).Type == ContactEndpointType.MobilePhone || ((ContactEndpoint)N).Type == ContactEndpointType.OtherPhone || ((ContactEndpoint)N).Type == ContactEndpointType.WorkPhone).ToList<object>();

foreach (var endPoint in endPoints)
{
    //((ContactEndpoint)endPoint).DisplayName.ToString(); //This is the phone number in string format
}
LyncClient-LyncClient=LyncClient.GetClient();
Contact Contact=lyncClient.ContactManager.GetContactByUri(“sip:contact@organization.com");
列表端点=新列表();
var电话号码=(列表)contact.GetContactInformation(ContactInformationType.ContactEndpoints);
端点=电话号码。其中(N=>((ContactEndpoint)N)。类型==ContactEndpointType.HomePhone | |((ContactEndpoint)N)。类型==ContactEndpointType.MobilePhone | |((ContactEndpoint)N)。类型==ContactEndpointType.WorkPhone)。ToList();
foreach(端点中的var端点)
{
//((ContactEndpoint)endPoint.DisplayName.ToString();//这是字符串格式的电话号码
}