Hi there!
I've got some trouble in running the BasicConferencing Quick Start sample (available here: http://msdn.microsoft.com/en-us/library/office/dn466142.aspx).
What I basically try to do is to set up a new conference, and create an IM flow. However, the IM call cannot be established, and an InvalidOperationException pops up.
Here's my code (taken from the Basic Conferencing Example):
// Join and wait, again forcing synchronization.
callerConversation.ConferenceSession.BeginJoin(_conference.ConferenceUri, null /*joinOptions*/,
EndJoinConference, callerConversation.ConferenceSession);
_waitForConferenceJoin.WaitOne();
// Placing the calls on the conference-connected conversation
// connects to the respective MCUs. These calls may then be used to
// communicate with the conference/MCUs.
InstantMessagingCall instantMessagingCall = new InstantMessagingCall(callerConversation);
// Hooking up event handlers and then placing the call.
instantMessagingCall.InstantMessagingFlowConfigurationRequested +=
this.instantMessagingCall_InstantMessagingFlowConfigurationRequested;
instantMessagingCall.StateChanged += this._call_StateChanged;
instantMessagingCall.BeginEstablish(EndCallEstablish, instantMessagingCall);
//Synchronize to ensure that call has completed.
_waitForCallEstablish.WaitOne();
ConferenceInvitationDeliverOptions deliverOptions = new ConferenceInvitationDeliverOptions();
deliverOptions.ToastMessage = new ToastMessage("Welcome to my conference");
ConferenceInvitation invitation = new ConferenceInvitation(callerConversation);
invitation.BeginDeliver(_ocUserURI, deliverOptions, EndDeliverInvitation, invitation);
Everything runs fine, up to the moment where the _waitForCallEstablish.WaitOne() line shall be executed. For a certain time (about 2 minutes), nothing happens. Then, the code continues execution and throws an InvalidOperationException pointing to the invitation.BeginDeliver statement. The error's text message reads: "The conversation does not have any established call or media session to conference."
For me it seems that the actual problem occurs earlier, upon establishing the IM call. Thus, I instead tried to make use of an async call in order to better track the problem:
IAsyncResult ar;ar = instantMessagingCall.BeginEstablish(null, null);
instantMessagingCall.EndEstablish(ar);
Again, it takes a while until an execption is thrown. This time, it is an OperationTimeoutException pointing to the EndEstablish(ar):
Microsoft.Rtc.Signaling.OperationTimeoutException wurde nicht behandelt.HResult=-2146233088
Message=This operation has timed out.
Source=Microsoft.Rtc.Collaboration
DetectionStackTrace= bei System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
bei System.Environment.get_StackTrace()
bei Microsoft.Rtc.Signaling.RealTimeException..ctor(String message, Exception innerException)
bei Microsoft.Rtc.Collaboration.Conferencing.SendCommandAsyncResult.FailPendingCommand(FailureReason reason)
bei Microsoft.Rtc.Collaboration.Conferencing.FailCommandWorkItem.Process()
bei Microsoft.Rtc.Signaling.AsyncWorkitemQueue.ProcessItems()
bei Microsoft.Rtc.Signaling.SerializationQueue`1.ResumeProcessing()
bei Microsoft.Rtc.Signaling.SerializationQueue`1.ResumeProcessingCallback(Object state)
bei Microsoft.Rtc.Signaling.QueueWorkItemState.ExecuteWrappedMethod(WaitCallback method, Object state)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
bei System.Threading.ThreadPoolWorkQueue.Dispatch()
Since client-client communication (with two "manual" users) is working properly, I have no clue what the reason for the exceptions could be.
I would be grateful for your ideas or hints!