2
哪個對象具有客戶聯繫信息,如辦公室,公司,IM等。在Lync SDK 2013中?我想知道用戶(客戶)的位置/地址信息。如何在lync sdk中獲取客戶的聯繫方式c#
哪個對象具有客戶聯繫信息,如辦公室,公司,IM等。在Lync SDK 2013中?我想知道用戶(客戶)的位置/地址信息。如何在lync sdk中獲取客戶的聯繫方式c#
在除了Kannan的答案,從聯繫人獲取電話號碼是不同的,需要更多的工作。下面是你如何做到這一點:
LyncClient lyncClient = LyncClient.GetClient();
Contact contact = lyncClient.ContactManager.GetContactByUri("sip:[email protected]");
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:[email protected]");
String officeLocation = contact.GetContactInformation(ContactInformationType.Office).ToString();
更多信息可以使用聯繫信息類型中獲得的個人筆記,公司,地點,部門等