使用UCMA 3.0安排Lync会议

时间:2014-01-09 11:44:41

标签: c# .net lync lync-2010 ucma

我正在尝试安排与UCMA 3.0的lync会议。创建会议后,我将ConferenceUri发送给用户,让他们加入会议。

<a href="callto:sip:tuser02@domain.ch;gruu;opaque=app:conf:focus:id:XXXXXXX">Lync Test 2.0</a>

我使用以下代码安排会议:

public LyncConference CreateConference(LyncConference lyncConference)
       {
        ApplicationEndpoint appEndpoint = CreateApplicationEndpoint();
        if (appEndpoint == null)
        {
            return null;
        }

        // Event to notify the main thread when the endpoint has scheduled a conference.
        AutoResetEvent waitForConferenceScheduling = new AutoResetEvent(false);

        LyncConference newLyncConference = null;

        ConferenceScheduleInformation conferenceScheduleInformation = CreateConferenceScheduleInformation(lyncConference, null);

        WriteLine("New Conference Schedule Information created. Calling Lync ...", EventLogEntryType.Information);

        Exception error = null;

        appEndpoint.ConferenceServices.BeginScheduleConference(conferenceScheduleInformation,
            result =>
            {
                try
                {
                    Conference conference = appEndpoint.ConferenceServices.EndScheduleConference(result);
                    newLyncConference = CreateLyncConference(conference);
                    waitForConferenceScheduling.Set();
                }
                catch (Exception e)
                {
                    error = e;
                    WriteLine(e.Message, EventLogEntryType.Error);
                    waitForConferenceScheduling.Set();
                }
            },
            appEndpoint.ConferenceServices);


        // Wait until scheduling of the conference completes.
        waitForConferenceScheduling.WaitOne();


        if (error != null)
        {
            String errorMessage = "Error while creating a new lync conference: " + error.Message;
            WriteLine(errorMessage, EventLogEntryType.Error);
            throw new Exception(error.Message, error);
        }

            WriteLine("Conference scheduled with ID: " + newLyncConference.ConferenceId, EventLogEntryType.Information);
            PrintConferenceInfo(newLyncConference);

        return newLyncConference;
    }

安排会议后,我将物业Conference.ConferenceUri发送给用户。 如果用户点击了与ConferenceUri的链接,则lync客户端会做出反应并询问是否要呼叫会议。一切正常,但我和其他模拟用户一起参加会议,这个用户自120天起离线。

有人能帮助我吗? 非常感谢。

3 个答案:

答案 0 :(得分:1)

根据UCMA 3.0会议流程:

  1. 使用BeginScheduleConference和EndScheduleConference安排会议。
  2. 使用BeginJoin和EndJoin重要加入会议(您的本地终点将通过这些来电加入会议)。
  3. 使用您的本地端点的BeginEscalateToConference和EndEscalateToConference升级。
  4. 现在您可以为其他参与者发布会议ID和uri。

答案 1 :(得分:0)

您是否查看过UCMA 3附带的示例应用?会议上有一个。该简短文章描述了该样本:

Schedule and Join a Conference (QuickStart)

答案 2 :(得分:0)

我认为你可以使用

conferenceScheduleInformation.ExpiryTime