0

エンドユーザーと専門家をマッチングさせる UCMA 3.0 ベースのアプリケーション/ボットがあります。エンド ユーザーからの 1 対 1 のチャット要求をマルチ ユーザー会議に移行し、そのマルチ ユーザー会議に専門家を招待します。アプリケーション自体は引き続き会議の参加者です。任意の時点で、アプリケーションによって仲介されるそのような会議がいくつかある場合がありますが、エンド ユーザーごとに 1 つだけです。ただし、1 人の専門家が同時に複数の会議に参加している場合があります。アプリケーション ログに、次の例外が表示されることがあります。

会議移行 conf 呼び出しのエラー # 63809878、アドレス :sip:xxxxxx@xxx.com;gruu;opaque=app:conf:focus:id:TQRREACE System.InvalidOperationException: 会議の招待または会議のエスカレーション要求を受信した後、別の会議に参加できません. Microsoft.Rtc.Collaboration.ConferenceSession.VerifyAndGetConferenceAddress (文字列 conferenceUri、文字列 parameterName) で Microsoft.Rtc.Collaboration.ConferenceSession.BeginJoinCommon (文字列 conferenceUri、ConferenceJoinOptions オプション、AsyncCallback userCallback、オブジェクト状態) で Microsoft.Rtc.Collaboration.ConferenceSession.BeginJoin (文字列 conferenceUri、ConferenceJoinOptions オプション、AsyncCallback userCallback、オブジェクト状態) at a(文字列 A_0、文字列 A_1、文字列 A_2、ブール A_3、ブール A_4)

Below is the code snippet used to make conference. Previously this site was an OCS 2007 R2 Installation and was migrated to Lync 2010 Server.
Site is running in mixed mode. It occurs only on production server and we are not able to generate this exception on dev server, we 
have tested it after generating more than 15 conferences simultaniously but no luck. 

private void CreateAdHohConf(string user1Uri, string user2uri, string subject) { 例外 exception = null;

            // Create conference scheduling details for the conference.
            ConferenceScheduleInformation scheduleInfo = new ConferenceScheduleInformation();

            // Restrict the conference to invited users only.
            scheduleInfo.AccessLevel = ConferenceAccessLevel.Everyone;


            // Set a subject for the conference.
            scheduleInfo.Subject = subject;
            scheduleInfo.Description = subject;
            scheduleInfo.ConferenceId = ConferenceServices.GenerateConferenceId();
            scheduleInfo.ExpiryTime = System.DateTime.Now.AddHours(8);
            scheduleInfo.IsPasscodeOptional = true;
            scheduleInfo.PhoneAccessEnabled = false;

            // Don't automatically assign a leader.
            scheduleInfo.AutomaticLeaderAssignment = AutomaticLeaderAssignment.Everyone;

            // Add the caller and recipient as participants.
            scheduleInfo.Participants.Add(new ConferenceParticipantInformation("sip:" + user1Uri, ConferencingRole.Leader));
            scheduleInfo.Participants.Add(new ConferenceParticipantInformation("sip:" + user2uri, ConferencingRole.Leader));

            scheduleInfo.Mcus.Add(new ConferenceMcuInformation(McuType.ApplicationSharing));
            scheduleInfo.Mcus.Add(new ConferenceMcuInformation(McuType.InstantMessaging));
            scheduleInfo.Mcus.Add(new ConferenceMcuInformation(McuType.AudioVideo));
            scheduleInfo.Mcus.Add(new ConferenceMcuInformation(McuType.Meeting));

             //Scheduling conference

            ConferenceServices objLocalConfSvc = lyncAgent.LocalEndpoint.ConferenceServices;
            Conference confSession = null;
            objLocalConfSvc.BeginScheduleConference(scheduleInfo,
                result =>
                {
                    try
                    {
                        confSession = objLocalConfSvc.EndScheduleConference(result);

                    }
                    catch (RealTimeException rtex)
                    {
                        exception = rtex;

                    }
                    catch (Exception ex)
                    {
                        exception = ex;

                    }
                    finally
                    {
                        _waitForConferenceScheduling.Set();
                    }
                }, objLocalConfSvc);

            _waitForConferenceScheduling.WaitOne();


            //Begin Join conference
           ConferenceSession objLocalConfSession=this.call.Conversation.ConferenceSession;
            try
            {
                ConferenceJoinOptions joinOptions = new ConferenceJoinOptions() { CanManageLobby = false, JoinMode = JoinMode.Default };
                objLocalConfSession.BeginJoin(new RealTimeAddress(confSession.ConferenceUri).Uri, joinOptions,
                    result => {
                        try
                        {
                            objLocalConfSession.EndJoin(result);
                        }
                        catch (Exception ex)
                        {
                            exception = ex;

                        }
                        finally
                        {
                            //Again, for sync. reasons.
                            _waitForConferenceJoin.Set();
                        }
                    }
                , this.call.Conversation.ConferenceSession);
                // Wait until join completes.new RealTimeAddress(this._conference.ConferenceUri).Uri,
                _waitForConferenceJoin.WaitOne();
            }
            catch (InvalidOperationException ioex)
            {
                exception = ioex;

            }
            catch (Exception ex)
            {
                exception = ex;

            }

            //Begin Escalation
          Conversation objLocalConv= this.call.Conversation;
          try
          {
              objLocalConv.BeginEscalateToConference(
                  result =>
                  {
                      try
                      {
                          objLocalConv.EndEscalateToConference(result);
                      }
                      catch (Exception ex)
                      {
                          exception = ex;

                      }
                      finally
                      {
                          //Sync It
                          _waitForEscalation.Set();
                      }
                  }
                      , objLocalConv);
              // Wait until escalation completes.
              _waitForEscalation.WaitOne();
          }
          catch (InvalidOperationException ioex)
          {
              exception = ioex;
          }
          catch (Exception ex)
          {
              exception = ex;
          }
          finally
          {
              if (exception != null)
              {
                  lyncAgent.Logger.Error( "Error in Conference Migration conf call # " + GetHashCode() + " , Address :" + confSession.ConferenceUri  , exception);
              }
          }
        }

優先順位に基づいて考えられる問題を提案してください。

        Thanks in advance.
4

2 に答える 2

0

このメソッドは、複数のソースから同時に呼び出される可能性のあるオブジェクトに存在しますか?

その場合、_waitForConferenceSchedulingのようなクラスレベルの変数のように見えるものを使用すると問題が発生する可能性があります。スレッドAは、スレッドBの非同期アクションが実際に完了する前に、誤ってスレッドBを続行させてしまう可能性があります。したがって、スレッドBは、.EndJoinが呼び出される前に.BeginEscalateを呼び出すことができます。

UCMAコードを作成するときは、通常、ネストされたコールバックを使用して、この種の問題が発生しないようにします。

それ以外の場合は、アプリケーションサーバーとLyncフロントエンドサーバーでOCSLoggerを実行して、SIPStack、S3、およびコラボレーションログを収集することをお勧めします。実際のSIPメッセージを詳細に見ると、いくつかの手がかりが得られます。

あなたは会議への招待とその招待への返答を探しているでしょう。

于 2012-05-02T22:33:29.460 に答える
0

原因を突き止めることができました。参加者リストのいずれかが、エンドポイントとの会話で会議の連絡先を既に追加している場合に発生します。

于 2013-02-03T04:47:04.993 に答える