Quantcast
Channel: Microsoft Lync Client Development forum
Viewing all 1578 articles
Browse latest View live

Issue while Integrating Lync 2013

$
0
0

My requirement is to create a small POC to show Lync integration with Lync 2013 SDK.

I created a C# Windows forms application with Lync 2013 sdk. I'm having following issue and my analysis. I would like to get support to resolve the issue.

Issue: Cannot sign in once signed out from Lync using my C# application. Receiving

Analysis: On Sign out I don't what Lync to store my Login information so  I used

_LyncClient.SignInConfiguration.ForgetMe("user@domain.com");

This will remove user Credentials from Windows Credential Manager (Control Panel > Credential Manager > )

Once signed out and tried to sign in, I'll receive above exception and an entry will be added to Registry>

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Lync > ConfigurationMode with value as 1. Once I change this value to 0, I'll be able to login. This key will get deleted once logged-in successfully.

Can any one help with this error or suggest any way to resolve this.


We are using the Lync SDK to fetch contact information but it fails to return complete phone number list.

$
0
0
  • Hi There ,

We are using the Lync SDK to fetch contact information and phone numbers to display in our application. Lync search control is used and on right click on a contact, we try to fetch the phone numbers of the contact.

This has intermittent issue of not returning the complete information in the contact card in Lync search control. At times it works good but other times, it fails to return complete phone number list.

List<object> endPoints = new List<object>(); List<ContactInformationType> _ContactInformationList = new List<ContactInformationType>(); _ContactInformationList.Add(ContactInformationType.EmailAddresses); _ContactInformationList.Add(ContactInformationType.ContactEndpoints); try { if (!string.IsNullOrWhiteSpace(sipuri)) { Contact _contact = lyncObj.ContactManager.GetContactByUri(sipuri); Microsoft.Lync.Controls.ContactCard _contactCard = new Microsoft.Lync.Controls.ContactCard(); _contactCard.Source = _contact.GetContactInformation(ContactInformationType.EmailAddresses); ContactSubscription _contactSubscription = lyncObj.ContactManager.CreateSubscription(); _contactSubscription.AddContact(_contact); _contactSubscription.Subscribe(ContactSubscriptionRefreshRate.High, _ContactInformationList); // add sleep to subscribe System.Threading.Thread.Sleep(500); var telephoneNumbersList =(List<object>)_contact.GetContactInformation(ContactInformationType.ContactEndpoints); foreach (object endPoint in telephoneNumbersList) { Logger.LogInfo(((ContactEndpoint)endPoint).DisplayName + " " + ((ContactEndpoint)endPoint).Type.ToString()); } endPoints = telephoneNumbersList.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>(); }

Several times, the complete contact information is not returned. Only one out of two phone numbers are seen in the contact information. While some time all phone numbers are returned.

If I try to search the same contact over Microsoft Lync search I can see all phone numbers in contact card.

Could you please suggest what could be the root cause and probable solution?

Thanks in advance.

Regards ,

Jyoti

Lync 2013, Accept incoming InstantMessage call

$
0
0

Hello,

Im having some troubles with the Lync 2013 client SDK. I want to accept incoming conversations with my own program. For AV-calls this is working fine: When a new conversation starts, the event fires, the AVModality state of the conversation is Notified and when calling Accept on the modality, the conversation window of Lync pops up as expected.

The trouble comes when trying to handling incoming IMcalls. On an incoming IMcall, the InstantMessageModality State is connected instead of notified. Also, calling Accept() on the modality does nothing. The first is acceptable, as i can register to window available events and interpret that. The second however is not. To me it seems rather strange this doesn't work.

Is there any way to accept an incoming IM conversation like a AVconversation? (Ie, it should open the lync conversation window)

Thnx

System.UnauthorizedAccessException when trying to accept audio call in Lync 2013

$
0
0
    

I have a problem with my Lync client that I am designing. I am running Lync 2013 in UI Suppression mode and I am able to send/receive IM's just fine, and begin audio calls. But a problem occurs when I try to receive an audio conversation from someone else. I get a System.UnauthorizedAccessException when I try to call this line of code:

conv.Modalities[ModalityTypes.AudioVideo].BeginConnect(ModalityCallback, asyncState);
       


It runs perfectly fine otherwise, and the call goes through okay and I can hear and talk to the other side just fine, but my User Interface freezes and I can't control anything due to this error. Even when the other side hangs up, I have to kill the process in Task Manager.

Here is my InitiateAVStream method, based on the MSDN Join Lync conversation example

        public bool InitiateAVStream()
        {
            Console.WriteLine("InitiateAVStream");
            if (conv.State == ConversationState.Terminated)
            {
                return false;
            }

            if (conv.Modalities[ModalityTypes.AudioVideo].CanInvoke(ModalityAction.Connect))
            {
                conv.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged += _AVModality_ModalityStateChanged;
                conv.Modalities[ModalityTypes.AudioVideo].ActionAvailabilityChanged += _AVModality_ActionAvailabilityChanged;

                //Accept the notification. If Lync UI is enabled, incoming call notification is closed.
                conv.Modalities[ModalityTypes.AudioVideo].Accept();

                //Connect the AV modality and begin to send and received AV stream.
                object[] asyncState = { conv.Modalities[ModalityTypes.AudioVideo], "CONNECT" };
                try
                {
                    conv.Modalities[ModalityTypes.AudioVideo].BeginConnect(ModalityCallback, asyncState);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
                return true;
            }
            return false;

        }


The output message:

A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Lync.Model.dll
    at Microsoft.Office.Uc.ModalityClass.Connect(ModalityConnectOptions _options, Object _modalityCallback, Object _state)
    at Microsoft.Lync.Model.Conversation.Modality.BeginConnect_private(ModalityConnectOptions options, AsyncCallback modalityCallback, Object state)
    at Microsoft.Lync.Model.Conversation.Modality.BeginConnect(AsyncCallback modalityCallback, Object state)
    at UIPrototype.MeetingForm.InitiateAVStream() in c:\Users\morrissi\Documents\Visual Studio 2012\Projects\UIPrototype\UIPrototype\MeetingForm.cs:line 758

Any input would be greatly appreciated. And it's strange to me that it only occurs when I try accepting an incoming audio call. Everything else works fine. I have not started work on video calls yet, but I will once I get audio working. The error leads me to believe that my program does not have sufficient permission to receive an audio call for some reason.

I have also tried using BeginRetrieve instead of BeginConnect and the same thing happens with the same error.

Thanks

Lync

$
0
0

Hi

Am working on Lync 2010 Plugin, I have a requirement to enhance the Lync Plugin to support Lync 2013 and backward capability too. Is it possible to work with both Lync 2010 and Lync 2013 ( and also Skype for Business)  with single Lync 2010 SDK ? Few blogs saying Lync 2013 SDK's will not support backward capabilities. Please suggest me on the SDK's to be used for all the above Lync versions. 

Thanks

Iframe in conversationwindowextension Lync client, blocked windows authentication

$
0
0

Hi,

I have this thing which is driving me crazy, because i cannot reproduce the behaviour. The situation i want is as follows:

We have a CWE hosted from localhost, containing an iframe. The source of the iframe is set to an https location requiring windows authentication (from the IIS its hosted by).

I would expect a windows box to popup, requesting the username and password (to use as credentials for the iframe), however, what happens is an IIS page is presented: "401 - Unauthorized: Access is denied due to invalid credentials.". The credentials box is not shown at all.

What i tried:

- Adding a P3P header to the https site. Result: forms authentication works (it needed the header for this, as it didnt work before)

- Creating a wpf project with an embedded browser. Result: all works as expected, a login box pops up and after that the site is loaded.

- Hosting the https page directly as a CWE page. Result: all works as expected.

- Adding every possible domain to the trusted sites

- Adding the https page to the trusted sites for Lync (HKEY\Software\Microsoft\Office\Lync\Security\Trusted Sites\... with http=1)

- At one point it did load the https page! I suspect some cookies were magicly saved and used to load the page, as i never got the login box thru the Lync conversation window. However, i cant get this situation again...

Forms authentication seems to work, alerts from the iframe content also popup - its just the windows authentication box that does not popup in the CWE.

Lync Conversation Window Extension with Multiparty Session

$
0
0

I am building an internet based collaboration application that I want hosted as as Lync Conversation Window Extension.

Have figured out how to register a Lync Conversation Window Extension

<<<<<<<<<<<

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Lync\Addins]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Lync\Addins\{00000000-0000-0000-0000-000000000001}]
"DefaultContextPackage"=dword:00000000
"Name"="TestApp"
"ExtensibilityWindowSize"=dword:00000002
"InternalURL"="http://www.TestApp.com"
"ExternalURL"="http://www.TestApp.com"

>>>>>>>>>>>>

Also figured out how to add a menu item to kick it off

<<<<<<<<

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Lync\SessionManager]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Lync\SessionManager\Apps]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Lync\SessionManager\Apps\{00000000-0000-0000-0000-000000000001}]
"Path"="http://www.TestApp.com"
"SessionType"=dword:00000002
"OriginatorPath"="http://www.TestApp.com"
"ApplicationType"=dword:00000001
"LiveServerIntegration"=dword:00000000
"Name"="TestApp"
"Extensiblemenu"="ConversationWindowContextual;ConversationWindowActions;"

>>>>>>

If I invoke the app via the ConversationWindowActions it opens up in the browser and the "Multiparty Session" session type sends an appINVITE SIP message sent to participants.

But I want it to come up as a Conversation Window Extension. Can do this if I invoke the ConversationWindowContextual. Great!
But the trouble is I want it to be a "Multiparty Session" and have an appINVITE SIP message sent to participants.

And that doesn't happen.

=====

So I have the two pieces working independently (ie "Multiparty Session" / "Lync Conversation Window Extension"). I need them working together.

Thoughts?

------
Jack Stephenson

Join a conference using UI Suppressed Mode

$
0
0

Hi,

I am building a UI Suppressed Lync client and would like to join an existing conference meeting using the url: https://meet.xyz.com/name/id

As i understand, I have converted the above url to the form of conf:name@domain... and used the follow code:

lyncClientObject.ConversationManager.AddConversation()

and then in ConversationAdded callback, I have issued the command:

ConversationManager.JoinConference(conferenceUrl) //The reason to do this in ConversationAdded call back is to get the conversation ID.

I have also subscribed to various sharing modality callbacks on the conversation.

Now my question:

I am able to join the conference but when someone shares their desktop/application my client is not being notified (no call backs are called) and also though I end the conversation, my client doesn't exist the conference room.

Please advise me if I am missing something? 

Also do we need to create multiple conversations in order to join a conference? (i.e. AddConversation and then JoinConference)

Thanks & Regards,

Ashwin Patti


Lync can not decode P frames

$
0
0

Hi there!

I'm having problem in implementing video call with Lync 2013 usingopenh264 library. As the UC_Specification_for_H264_AVC_and_SVC_encoder document Lync supports H264 AVC and I configured to use H264 AVC from openh264. My application sends both I and P frames and so does Lync 2013 client butmy application can decode I & P frames from Lync client whileLync client just be able to decode I frames from my application. Anyone helps me to detect the reasons. Thanks in advance!

Below are encoder/decoder initiations:

SEncParamExt eprm;
pj_bzero(&eprm, sizeof(eprm));
eprm.iUsageType = CAMERA_VIDEO_REAL_TIME;

eprm.iPicWidth = param->enc_fmt.det.vid.size.w;
eprm.iPicHeight = param->enc_fmt.det.vid.size.h;
eprm.iTargetBitrate = param->enc_fmt.det.vid.avg_bps;
eprm.iRCMode = RC_QUALITY_MODE;
eprm.fMaxFrameRate = (param->enc_fmt.det.vid.fps.num * 1.0 / param->enc_fmt.det.vid.fps.denum);

eprm.iTemporalLayerNum  = 1;  
eprm.iSpatialLayerNum = 1;

eprm.iComplexityMode = MEDIUM_COMPLEXITY;
eprm.uiIntraPeriod = 0;
eprm.iNumRefFrame = -1;
eprm.eSpsPpsIdStrategy = CONSTANT_ID;
eprm.bPrefixNalAddingCtrl = false;
eprm.bEnableSSEI = false;
eprm.bSimulcastAVC = false;  //  false: use SVC syntax for higher spatial layers; true: use Simulcast AVC
eprm.iPaddingFlag = 0;
eprm.iEntropyCodingModeFlag = 0;  // 0:CAVLC (baseline profile) 1:CABAC (high profile).

/* rc control */
eprm.bEnableFrameSkip = false;
eprm.iMaxBitrate = param->enc_fmt.det.vid.max_bps;

/*LTR settings*/
eprm.bEnableLongTermReference = false;
eprm.iLtrMarkPeriod = 30;

/* multi-thread settings*/
eprm.iMultipleThreadIdc = 0;  // auto

/* Deblocking loop filter */
eprm.iLoopFilterDisableIdc = 1;  // off
eprm.iLoopFilterAlphaC0Offset = 0;
eprm.iLoopFilterBetaOffset = 0;

/*pre-processing feature*/
eprm.bEnableDenoise = false;
eprm.bEnableBackgroundDetection = true;
eprm.bEnableAdaptiveQuant = false;
eprm.bEnableFrameCroppingFlag = true;
eprm.bEnableSceneChangeDetect = true;
eprm.bIsLosslessLink = false;

if (!oh264_data->whole) {
    eprm.uiMaxNalSize = param->enc_mtu;
}

SLayerPEncCtx elayer_ctx;
elayer_ctx.iDLayerQp = 24;
elayer_ctx.sSliceCfg.uiSliceMode = (oh264_data->whole ? SM_SINGLE_SLICE : SM_DYN_SLICE);
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceSizeConstraint = param->enc_mtu;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceNum = 1;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[0] = 960;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[1] = 0;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[2] = 0;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[3] = 0;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[4] = 0;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[5] = 0;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[6] = 0;
elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[7] = 0;

for (int i = 0; i < eprm.iSpatialLayerNum; i++) {
    eprm.sSpatialLayers[i].iVideoWidth = eprm.iPicWidth;
    eprm.sSpatialLayers[i].iVideoHeight = eprm.iPicHeight;
    eprm.sSpatialLayers[i].fFrameRate = eprm.fMaxFrameRate;

    eprm.sSpatialLayers[i].uiProfileIdc = PRO_BASELINE;
    //eprm.sSpatialLayers[i].uiLevelIdc = LEVEL_3_1;
    eprm.sSpatialLayers[i].iSpatialBitrate = eprm.iTargetBitrate;
    eprm.sSpatialLayers[i].iDLayerQp = elayer_ctx.iDLayerQp;
    eprm.sSpatialLayers[i].sSliceCfg.uiSliceMode = elayer_ctx.sSliceCfg.uiSliceMode;

    memcpy( &eprm.sSpatialLayers[i].sSliceCfg,
            &elayer_ctx.sSliceCfg,
            sizeof (SSliceConfig));
    memcpy( &eprm.sSpatialLayers[i].sSliceCfg.sSliceArgument.uiSliceMbNum[0],
            &elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum[0],
            sizeof (elayer_ctx.sSliceCfg.sSliceArgument.uiSliceMbNum));
}

/* Initialize encoder */
rc = oh264_data->enc->InitializeExt (&eprm);
if (rc != cmResultSuccess) 
    return false;

/* Init input picture */
oh264_data->esrc_pic->iColorFormat = videoFormatI420;
oh264_data->esrc_pic->uiTimeStamp = 0;
oh264_data->esrc_pic->iPicWidth = eprm.iPicWidth;
oh264_data->esrc_pic->iPicHeight = eprm.iPicHeight;
oh264_data->esrc_pic->iStride[0] = oh264_data->esrc_pic->iPicWidth;
oh264_data->esrc_pic->iStride[1] = oh264_data->esrc_pic->iStride[2] = oh264_data->esrc_pic->iStride[0]>> 1;

oh264_data->enc_input_size = oh264_data->esrc_pic->iPicWidth * oh264_data->esrc_pic->iPicHeight * 3 >> 1;

int videoFormat = videoFormatI420;
oh264_data->enc->SetOption (ENCODER_OPTION_DATAFORMAT, &videoFormat);

/*
 * Decoder
 */
oh264_data->dec->SetOption(DECODER_OPTION_TRACE_LEVEL, &trace_level);

sDecParam.sVideoProperty.size = sizeof (sDecParam.sVideoProperty);
sDecParam.eOutputColorFormat = videoFormatI420;
sDecParam.uiTargetDqLayer = (pj_uint8_t) - 1;
// sDecParam.eEcActiveIdc = ERROR_CON_FRAME_COPY;
sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;  /* SVC */

rc = oh264_data->dec->Initialize (&sDecParam);
if (rc) 
    return false;

pj_int32_t color_fmt = videoFormatI420;
rc = oh264_data->dec->SetOption (DECODER_OPTION_DATAFORMAT,  &color_fmt);
if (rc) 
    return false;

InvalidCastException on LyncClient.GetClient()

$
0
0

I cget an exception on "LyncClient.GetClient()" - I've tried this one two different machines, and I'm getting the same results. Here are the details:

  • Visual Studio 2012
  • Lync 2013 Client installed, with silverlight (part of Office 2013), and running/signed in
  • Lync 2013 SDK installed

I've first tried writing my own test project, but I'm also getting the same error on the sample projects (sample project: ContactInformation, MainWindow.xaml.cs, line 66). Here's the exception details:

InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Uc.UCOfficeIntegration'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6A222195-F65E-467F-8F77-EB180BD85288}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Stack Trace:    at Microsoft.Lync.Model.LyncClient.EnsureOI()
   at Microsoft.Lync.Model.LyncClient.GetClient()
   at ContactInformation.MainWindow.Window_Loaded(Object sender, RoutedEventArgs e) in c:\Program Files (x86)\Microsoft Office\Office15\LyncSDK\samples\ContactInformation\MainWindow.xaml.cs:line 66

Note: I've also tried adding a reference to C:\Program Files (x86)\Microsoft Office\Office15\LyncSDK\Assemblies\Desktop\Microsoft.Office.Uc.dll

When doing the "GetClient()", I get the following exception, instead: "The type initializer for 'Microsoft.Lync.Model.LyncClient' threw an exception."

InnerException:
{"Could not load file or assembly 'Microsoft.Office.Uc, Version=15.0.4454.1509, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.":"Microsoft.Office.Uc, Version=15.0.4454.1509, Culture=neutral, PublicKeyToken=71e9bce111e9429c"}

Starting a Lync conversation with InstantMessage

$
0
0

Im having an issue with the InstantMessage geting to the Conversation, The Participants are being added and the windows starts up but no Message.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using Microsoft.Lync.Model;
using Microsoft.Lync.Model.Extensibility;
using Microsoft.Lync.Model.Conversation;
using MessageBox = System.Windows.MessageBox;

namespace Automation
{
    public partial class MainWindow : Window
    {
        Microsoft.Lync.Model.Extensibility.Automation automation;
        public MainWindow()
        {
            InitializeComponent();
        }
        #region Handlers for user interface controls events
        private void CallButton_Click(object sender, RoutedEventArgs e)
        {
                //Start the conversation
                automation = LyncClient.GetAutomation();

            if (automation != null)
            {
                    //Get the conversation modalities and settings
                    AutomationModalities conversationModes = 0;
                    Dictionary<AutomationModalitySettings, object> conversationSettings = new

Dictionary<AutomationModalitySettings, object>();
                    //Get the participants
                    List<string> participants = new List<string>();
                    participants.Add("sip:someone@thissite.com");
                    participants.Add("sip:someoneelse@thissite.com");
                    //Instant Message modality
                    conversationModes |= AutomationModalities.InstantMessage;
                    conversationSettings.Add(AutomationModalitySettings.SendFirstInstantMessageImmediately, true);
                    conversationSettings.Add(AutomationModalitySettings.Subject, "Subject goes here");
                    conversationSettings.Add(AutomationModalitySettings.FirstInstantMessage, MessageTextBox.Text);
                    automation.BeginStartConversation(conversationModes, participants, conversationSettings,

StartConversationCallback, null);
            }
            else
            {
                MessageBox.Show("Lync was not initialized property.  Please restart this application.");
            }
        }
        private void StartConversationCallback(IAsyncResult result)
        {
                automation.EndStartConversation(result);
        }
#endregion

    }
}
any help would be great, Thanks in advance.



Microsoft.Lync.Model.ClientNotFoundException: The host process is not running

$
0
0

Hi ,

Am working for Lync Plugin development installed Lync client 2010 and Lync 2010 SDK in windows 8.1 64 bit PC , When i run the following code am getting "The host process is not running".

  _lyncClient = LyncClient.GetClient(); // Throws the above mentioned error .

I need a clarification that if my Lync server is 2013 do i need to use Lync 2013 SDK and for Lync server 2010 i need to use Lync 2010 SDK's ?? as per the below link I have doubt using the SDK's and how to avoid the error message.

http://www.postseek.com/meta/ce43d8320373e1ec3462ed027bc247c3

My requirement is, the plugin should support both Lync 2010 and Lync 2013 client . Please help me on which SDK do i need to use for development to support both Client 2010 and 2013. Irrespective of Lync server configured .

Thanks 

                       

Disable Sign out and Exit options in lync 2013 client

$
0
0

Hello,

One of our customers wants to disable Sign out and Exit optins from Lync 2013 client

any help how to disable these options?

Thanks in advance,

Ahmad Badr

Error when trying to run Lync 2013 with a different windows account

$
0
0

Hope someone can help me

Because of security reasons I  needed to change the default account (network service) that Lync 2013 runs under to use another windows account.

I added the account to the correct RTC groups, gave access to the databases however, all Lync Services start with this account with the exception of the Lync Front-End Server which I get the error below:

Application: RtcHost.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: Microsoft.Rtc.Sip.UnauthorizedException

Stack:

   at Microsoft.Rtc.Sip.ServerAgent.Initialize(ApplicationManifest manifest, Boolean scriptOnly)

   at Microsoft.Rtc.ApplicationService.ApplicationService.Start(EventWaitHandle shutdownEvent, RoleName roleName)

   at Microsoft.Rtc.ApplicationService.ApplicationService.Main(String[] args)

   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)

   at System.AppDomain.ExecuteAssemblyByName(System.String, System.String[])

   at Microsoft.Rtc.AppDomainHost.Launcher+AppDomainLauncher.RunThread()

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Threading.ThreadHelper.ThreadStart()

Your help is really appreciate.


Missing Images in UISuppession mode

$
0
0

I need help with a Lync issue we’re having while running LyncClient in UISuppession mode. We are trying to retrieve images for the contacts so we can use them in our application in a similar manor to the Lync client. What we are seeing is that some or most the images aren’t loading. The problem is sporadic affecting different users each time we run tests. We are using the ContactInformationChanged event to trigger our code to load the image thru the GetContactInformation(ContactInformationType.Photo). What I’m seeing is that for some of our installations images aren’t loading for some of the contacts that do have photos visible when the client runs with its UI. Over time it does find most of them but we are still failing to load them all and only some photos load in a timely manner. Below is my code used to load photos.

In the event handler:

if (e.ChangedContactInformation.Contains(ContactInformationType.Photo))

               OnPhotoChanged(sender, Utils.GetPhoto(sender, Settings.DefaultContactImagePath)); 

Here’s my method to retrieve the photo:

public static BitmapImage GetPhoto(object sender, Uri fallbackImagePath)

        {

            Stream photoStream;

            Contact contact = sender as Contact;

            ClientState state = Lync.LyncState;

            photoStream = GetImageStream(contact);

            if (photoStream == null)

            {

               Logger.Warning("No Image " + contact.Uri);

            }

            else

            {

               Logger.Warning("Found Image " + contact.Uri);

            }

            BitmapImage userImageBitMap = new BitmapImage();

            if (photoStream != null)

            {

               try

               {

                   userImageBitMap.BeginInit();

                   userImageBitMap.StreamSource = photoStream;

                   userImageBitMap.EndInit();

                   userImageBitMap.Freeze()

               }

               catch (Exception)

               { userImageBitMap = new BitmapImage(fallbackImagePath); }

            }

            else

            userImageBitMap = new BitmapImage(fallbackImagePath);

            userImageBitMap.Freeze();

             return userImageBitMap;

        }

 

public static Stream GetImageStream(Contact contact)

        {

            Stream imgStream = null;

        

            try

            { imgStream = contact.GetContactInformation(ContactInformationType.Photo) as Stream; }

            catch (NotReadyException)

            { return null; }

            catch (ItemNotFoundException)

            { return null; }

            catch (LyncClientException)

            { return null; }

 

            return imgStream;

        }


LyncClient.GetClient() Throws COM Exception

$
0
0

Hi 

Am working on Lync Plugin in Development, My requirement is the plugin in should support both Lync2010 , Lync 2013 client & skype for business . Installed Lync 2010 SDK  with Lync 2010 client & Skype for business 2015. While executing the code with skype for business as running process LyncClient.GetClient() Throws the following error

"Generic COM Exception. Code is 0x80080005."

Few blogs are saying to uninstall Lync 2010 client but my requirement is to work with both Lync 2010 and skype for business any one running at a time. Please suggest me the right SDK to support both Lync clients . Appreciate your quick response. 

Thanks

System.UnauthorizedAccessException when trying to accept audio call in Lync 2013

$
0
0
    

I have a problem with my Lync client that I am designing. I am running Lync 2013 in UI Suppression mode and I am able to send/receive IM's just fine, and begin audio calls. But a problem occurs when I try to receive an audio conversation from someone else. I get a System.UnauthorizedAccessException when I try to call this line of code:

conv.Modalities[ModalityTypes.AudioVideo].BeginConnect(ModalityCallback, asyncState);
       


It runs perfectly fine otherwise, and the call goes through okay and I can hear and talk to the other side just fine, but my User Interface freezes and I can't control anything due to this error. Even when the other side hangs up, I have to kill the process in Task Manager.

Here is my InitiateAVStream method, based on the MSDN Join Lync conversation example

        public bool InitiateAVStream()
        {
            Console.WriteLine("InitiateAVStream");
            if (conv.State == ConversationState.Terminated)
            {
                return false;
            }

            if (conv.Modalities[ModalityTypes.AudioVideo].CanInvoke(ModalityAction.Connect))
            {
                conv.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged += _AVModality_ModalityStateChanged;
                conv.Modalities[ModalityTypes.AudioVideo].ActionAvailabilityChanged += _AVModality_ActionAvailabilityChanged;

                //Accept the notification. If Lync UI is enabled, incoming call notification is closed.
                conv.Modalities[ModalityTypes.AudioVideo].Accept();

                //Connect the AV modality and begin to send and received AV stream.
                object[] asyncState = { conv.Modalities[ModalityTypes.AudioVideo], "CONNECT" };
                try
                {
                    conv.Modalities[ModalityTypes.AudioVideo].BeginConnect(ModalityCallback, asyncState);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
                return true;
            }
            return false;

        }


The output message:

A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Lync.Model.dll
    at Microsoft.Office.Uc.ModalityClass.Connect(ModalityConnectOptions _options, Object _modalityCallback, Object _state)
    at Microsoft.Lync.Model.Conversation.Modality.BeginConnect_private(ModalityConnectOptions options, AsyncCallback modalityCallback, Object state)
    at Microsoft.Lync.Model.Conversation.Modality.BeginConnect(AsyncCallback modalityCallback, Object state)
    at UIPrototype.MeetingForm.InitiateAVStream() in c:\Users\morrissi\Documents\Visual Studio 2012\Projects\UIPrototype\UIPrototype\MeetingForm.cs:line 758

Any input would be greatly appreciated. And it's strange to me that it only occurs when I try accepting an incoming audio call. Everything else works fine. I have not started work on video calls yet, but I will once I get audio working. The error leads me to believe that my program does not have sufficient permission to receive an audio call for some reason.

I have also tried using BeginRetrieve instead of BeginConnect and the same thing happens with the same error.

Thanks

Call StatusChange event fired too late in lync

$
0
0
Hi,
I am developing an application using Lync that creates a conference call and when call is connected I add a participant to the existing conversation. I need to track the event whether call to the newly added participant is successful.
My problem is e.Participant.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged event firing late approx 1-3 minutes except the first case.
Please tell me the way to get it as call get disconnected.
Below is complete event implementation:
e.Participant.Modalities[ModalityTypes.AudioVideo].ModalityStateChanged += new EventHandler<ModalityStateChangedEventArgs>(IMLyncClient_ModalityStateChanged);
void IMLyncClient_ModalityStateChanged(object sender, ModalityStateChangedEventArgs e)
        {
           switch (e.StatusCode)
            {
                case 0:
   //This code is executed when call received and then disconnected.
                      break;
                case -2131820044:
                    // this case is execute either number is wrong or not connected or (connected but not received.) or expliciltly disconnected without received.
                    break;
                case -2131820134:
   //if number is busy then execute this code.
                   break;
                default:
   //if above condition is not fulfill then it execute
                    MessageBox.Show("Default :  " + e.NewState.ToString() + " Status Code : " + e.StatusCode);
                    break;
            }
}

DIsable Lync Custom Command

$
0
0

I have added a custom menu using to link using the

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Lync\SessionManager\Apps

registry key.

Is there a way to disable/enable it?

Programatically Call Lync Custom Command

$
0
0

I have added a custom menu using to link using the

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Lync\SessionManager\Apps

registry key.

Is there a way to invoke it programmatically.

When I click on it, the command gets executed for others in the meeting (if they have it registered).

I would like to kick off the same thing programmatically, but don't know how?

Viewing all 1578 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>