Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get the phone number of the contact that was clicked in Lync 2013?
    primarykey
    data
    text
    <p>I would like to know the proper way of getting the phone number that was clicked when right-clicking a contact in Lync and select call and then click on a number. </p> <p>Expected is a tel string with the number that was clicked. </p> <p>Could someone please outline the event we would use in that case and the code to retrieve the number?</p> <p>At the moment I am using the <code>ConversationManager.ConversationAdded</code> event and retrieving the number from the contact endpoint URI but that only works half of the time as sometimes the default endpoint comes through as a SIP string even I clicked on the actual phone number.</p> <p>Here the code.</p> <pre><code>Private Sub ConversationManager_ConversationAdded(ByVal sender As Object, ByVal e As Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs) Handles m_lyncConversationManager.ConversationAdded Dim ConvParticipants As IList(Of Participant) = e.Conversation.Participants Dim ContactURI() As String = ConvParticipants.Item(1).Contact.Uri.ToString().Split(":") If e.Conversation.Modalities(ModalityTypes.AudioVideo).State = ModalityState.Connecting Then Dim outboundContact As Contact = ConvParticipants.Item(1).Contact Dim _ContactSettings As IDictionary(Of ContactSetting, Object) = outboundContact.Settings Dim outObject As Object = Nothing Dim PhoneNumber() As String If _ContactSettings.TryGetValue(ContactSetting.DefaultContactEndpoint, outObject) Then PhoneNumber = DirectCast(outObject, ContactEndpoint).Uri.Split(":") </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload