Example #1
0
        /// <summary>
        /// av call establish completed callback method.
        /// </summary>
        /// <param name="asyncResult">Async result.</param>
        private void AvCallEstablishmentCompleted(IAsyncResult asyncResult)
        {
            Exception caughtException            = null;
            bool      unhandledExceptionDetected = true;
            WebAvCall webAvCall = null;

            try
            {
                webAvCall = this.ConversationModel.ContactCenterService.EndEstablishAvCall(asyncResult);
                unhandledExceptionDetected = false;
            }
            catch (FaultException <OperationFault> fex)
            {
                caughtException            = fex;
                unhandledExceptionDetected = false;
            }
            finally
            {
                if (unhandledExceptionDetected)
                {
                    Debug.Assert(null == caughtException, "Caught exception is not null");
                    caughtException = new Exception(ExceptionResource.UnhandledExceptionOccured);
                }

                if (caughtException != null)
                {
                    this.Complete(caughtException);
                }
                else
                {
                    Debug.Assert(null != webAvCall, "For successful case av call should not be null");
                    AddClickToCallResult result = new AddClickToCallResult(webAvCall.WebConversation);
                    this.Complete(result);
                }
            }
        }
Example #2
0
 /// <summary>
 /// Constructor to create audio video call context for a given web avcall.
 /// </summary>
 /// <param name="webAvCall">Web avcall.</param>
 internal AudioVideoCallContext(WebAvCall webAvCall)
 {
     m_webAvCall = webAvCall;
 }