回答

0

在除了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 
} 
2

用戶定位/可從接觸對象如下獲得辦公信息:

LyncClient lyncClient = LyncClient.GetClient(); 
Contact contact = lyncClient.ContactManager.GetContactByUri("sip:[email protected]"); 
String officeLocation = contact.GetContactInformation(ContactInformationType.Office).ToString(); 

更多信息可以使用聯繫信息類型中獲得的個人筆記,公司,地點,部門等

相關問題