public override void PerformAnswerCallAction(CXProvider provider, CXAnswerCallAction action) { // Find requested call var call = CallManager.FindCall(action.CallUuid); // Found? if (call == null) { // No, inform system and exit action.Fail(); return; } // Attempt to answer call call.AnswerCall((successful) => { // Was the call successfully answered? if (successful) { // Yes, inform system action.Fulfill(); } else { // No, inform system action.Fail(); } }); }
public override void PerformEndCallAction(CXProvider provider, CXEndCallAction action) { Console.WriteLine("CXProviderDelegate: PerformEndCallAction " + action.CallUuid); // Find requested call var call = CallManager.FindCall(action.CallUuid); // Found? if (call == null) { // No, inform system and exit action.Fail(); return; } // Attempt to answer call call.EndCall((successful) => { // Was the call successfully answered? if (successful) { // Remove call from manager's queue CallManager.Calls.Remove(call); // Yes, inform system action.Fulfill(); } else { // No, inform system action.Fail(); } }); }
public override void PerformSetHeldCallAction(CXProvider provider, CXSetHeldCallAction action) { // Find requested call var call = CallManager.FindCall(action.CallUuid); // Found? if (call == null) { // No, inform system and exit action.Fail(); return; } // Update hold status call.IsOnHold = action.OnHold; // Inform system of success action.Fulfill(); }