public void EndCall(ActiveCall call) { // Build action var endCallAction = new CXEndCallAction(call.UUID); // Create transaction var transaction = new CXTransaction(endCallAction); // Inform system of call request SendTransactionRequest(transaction); }
public void RemoveCallFromOnHold(ActiveCall call) { // Build action var holdCallAction = new CXSetHeldCallAction(call.UUID, false); // Create transaction var transaction = new CXTransaction(holdCallAction); // Inform system of call request SendTransactionRequest(transaction); }
public override void PerformStartCallAction(CXProvider provider, CXStartCallAction action) { Console.WriteLine("CXProviderDelegate: PerformStartCallAction"); // Create new call record var activeCall = new ActiveCall(action.CallUuid, action.CallHandle.Value, true); // Monitor state changes activeCall.StartingConnectionChanged += (call) => { if (call.isConnecting) { // Inform system that the call is starting Provider.ReportConnectingOutgoingCall(call.UUID, call.StartedConnectingOn.ToNSDate()); } }; activeCall.ConnectedChanged += (call) => { if (call.isConnected) { // Inform system that the call has connected provider.ReportConnectedOutgoingCall(call.UUID, call.ConnectedOn.ToNSDate()); } }; // Start call activeCall.StartCall((successful) => { // Was the call able to be started? if (successful) { // Yes, inform the system action.Fulfill(); // Add call to manager CallManager.Calls.Add(activeCall); } else { // No, inform system action.Fail(); } }); }
public ValidTVOCallDelegate(ActiveCall.ActiveCallbackDelegate completionHandler , ActiveCall currentCall) { _currentCall = currentCall; _completionHandler = completionHandler; }