private void EndTransferCall(IAsyncResult ar) { AudioVideoCall audioVideoCall = ar.AsyncState as AudioVideoCall; try { // End transferring the incoming call. audioVideoCall.EndTransfer(ar); } catch (OperationFailureException OpFailEx) { // Operation failure exception can occur when the far end transfer // does not complete successfully, usually due to the transferee failing to pick up. Console.WriteLine(OpFailEx.ToString()); } catch (RealTimeException realTimeEx) { // Real time exception can occur when the far end transfer does // not complete successfully, usually due to a link-layer or // transport failure (i.e: Link dead, or failure response.). Console.WriteLine(realTimeEx.ToString()); } finally { //Again, just to sync the completion of the code. _waitForTransferComplete.Set(); } }
private void TransferCallCompleted(IAsyncResult ar) { AudioVideoCall audioVideoCall = ar.AsyncState as AudioVideoCall; try { // End transferring the incoming call. audioVideoCall.EndTransfer(ar); } catch (OperationFailureException OpFailEx) { // Operation failure exception can occur when the far end transfer // does not complete successfully, usually due to the transferee // failing to pick up. Console.WriteLine(OpFailEx.ToString()); } // Again, just to sync the completion of the code. _sampleCompleted.Set(); }