我可以在Lync 2013中打开音频呼叫的上下文扩展窗口吗? [英] Can I open Contextual Extension Window for audio call in Lync 2013?

查看:54
本文介绍了我可以在Lync 2013中打开音频呼叫的上下文扩展窗口吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我们可以在Lync 2010中打开CWE进行音频呼叫,但是我们可以在Lync 2013中执行相同操作吗?

I know we can open CWE for audio calls in Lync 2010 but can we do the same in Lync 2013?

我有程序为lync 2010打开CWE但是相同的代码在Lync 2013中不起作用。

I have program to open CWE for lync 2010 but the same code is not working in Lync 2013.

我也尝试了另一种方法,但它不起作用。这是我正在尝试的代码。

I also tried the other way but its not working. Here is the code that I am trying.

  PerformRunTimeRegistration();



                this.myApplicationRegistration.AddRegistration();

               自动化自动化= LyncClient.GetAutomation();

                Microsoft.Lync.Model.Extensibility.AutomationModalitySettings.ApplicationId.Equals(GUIDnew);

                Microsoft.Lync.Model.Extensibility.AutomationModalitySettings.ApplicationData.Equals(" 1234");



               试试
                {

                    avModality.EndConnect(avModality.BeginConnect(BeginConversationCallBack,automation));

                }¥b $ b                catch(LyncClientException lyncClientException)

                {

                    Console.WriteLine(lyncClientException);

                }¥b $ b                catch(SystemException systemException)

                {

                    if(LyncModelExceptionHelper.IsLyncException(systemException))

                    {

                        //记录Lync Model API抛出的异常。

                        Console.WriteLine(" Error:" + systemException);

                    }¥b $ b                   否则

                    {

                        //重新抛出不是来自Lync Model API的SystemException。

                       扔;

                    }¥b $ b                }

 PerformRunTimeRegistration();

                this.myApplicationRegistration.AddRegistration();
                Automation automation = LyncClient.GetAutomation();
                Microsoft.Lync.Model.Extensibility.AutomationModalitySettings.ApplicationId.Equals(GUIDnew);
                Microsoft.Lync.Model.Extensibility.AutomationModalitySettings.ApplicationData.Equals("1234");

                try
                {
                    avModality.EndConnect(avModality.BeginConnect(BeginConversationCallBack, automation));
                }
                catch (LyncClientException lyncClientException)
                {
                    Console.WriteLine(lyncClientException);
                }
                catch (SystemException systemException)
                {
                    if (LyncModelExceptionHelper.IsLyncException(systemException))
                    {
                        // Log the exception thrown by the Lync Model API.
                        Console.WriteLine("Error: " + systemException);
                    }
                    else
                    {
                        // Rethrow the SystemException which did not come from the Lync Model API.
                        throw;
                    }
                }

此代码接受调用并调用函数BeginConversationCallBack。

This code accepts the call and call the function BeginConversationCallBack.

以下是PerformRunTimeRegistration()和  BeginConversationCallBack(IAsyncResult ar)的代码:

Here is the code for PerformRunTimeRegistration() and BeginConversationCallBack(IAsyncResult ar):

void PerformRunTimeRegistration()

        {

            //确保此GUID与上一节中输入的注册表值相匹配。

             newguid = guidGenerator.ToString();

            newguid ='{'+ newguid +'}';



            GUIDnew = newguid;

            GUIDexstng = newguid;



            gguid = GUIDnew;

            string appname = checkparticipant;

            myApplicationRegistration = LyncClient.GetClient()。CreateApplicationRegistration(gguid,appname);



            //设置"对话窗口扩展"属性。

            //确保internalURL参数在您的计算机上有效。

            myApplicationRegistration.SetExtensibilityWindowProperties(accurlfinal,accurlfinal,ConversationWindowExtensionSize.Medium);



            //注册申请。

            this.myApplicationRegistration.AddRegistration();

        }


        //通知Automation对象和ConversationWindow

        //对话开始了。

        private void BeginConversationCallBack(IAsyncResult ar)

        {

$
            if(ar.IsCompleted == true)

            {

                // ar.AsyncWaitHandle.WaitOne();

                Automation _automation = ar.AsyncState as Automation;

                cWindow = _automation.EndStartConversation(ar);

                IAsyncResult OpenExtensibilityResult = cWindow.BeginOpenExtensibilityWindow(gguid,null,null);

                cWindow.EndOpenExtensibilityWindow(OpenExtensibilityResult);

            }

void PerformRunTimeRegistration()
        {
            // Ensure that this GUID matches the registry value entered in the previous section.
            newguid = guidGenerator.ToString();
            newguid = '{' + newguid + '}';

            GUIDnew = newguid;
            GUIDexstng = newguid;

            gguid = GUIDnew;
            string appname = checkparticipant;
            myApplicationRegistration = LyncClient.GetClient().CreateApplicationRegistration(gguid, appname);

            // Set the Conversation Window Extension properties.
            // Ensure that the internalURL parameter is valid on your computer.
            myApplicationRegistration.SetExtensibilityWindowProperties(accurlfinal, accurlfinal, ConversationWindowExtensionSize.Medium);

            // Register the application.
            this.myApplicationRegistration.AddRegistration();
        }

        // Notify the Automation object and ConversationWindow
        // that the conversation started.
        private void BeginConversationCallBack(IAsyncResult ar)
        {

            if (ar.IsCompleted == true)
            {
               // ar.AsyncWaitHandle.WaitOne();
                Automation _automation = ar.AsyncState as Automation;
                cWindow = _automation.EndStartConversation(ar);
                IAsyncResult OpenExtensibilityResult = cWindow.BeginOpenExtensibilityWindow(gguid, null, null);
                cWindow.EndOpenExtensibilityWindow(OpenExtensibilityResult);
            }

}

任何人都可以帮助我吗?

Can anyone help me?

推荐答案

2010和2013 SDK之间的上下文应用程序的注册密钥已更改。我不知道你是否处理过。请参阅此处:

Reg keys for contextual applications changed between the 2010 and 2013 SDK. I don't know if you handled that or not. See here:

Lync 2013系统注册表项


这篇关于我可以在Lync 2013中打开音频呼叫的上下文扩展窗口吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆