public void EndCall(ActiveCall call) { if (call != null) { var endCallAction = new CXEndCallAction(call.UUID); var transaction = new CXTransaction(endCallAction); SendTransactionRequest(transaction); } }
public void PlaceCallOnHold(ActiveCall call) { if (call != null) { var holdCallAction = new CXSetHeldCallAction(call.UUID, true); var transaction = new CXTransaction(holdCallAction); SendTransactionRequest(transaction); } }
public void AnswerCall(ActiveCall call) { if (call != null) { var answerCallAction = new CXAnswerCallAction(call.UUID); var transaction = new CXTransaction(answerCallAction); SendTransactionRequest(transaction); } }
public void MuteCall(ActiveCall call, bool mute) { if (call != null) { var holdCallAction = new CXSetMutedCallAction(call.UUID, mute); var transaction = new CXTransaction(holdCallAction); SendTransactionRequest(transaction); } }
public void RemoveCallFromOnHold(ActiveCall call) { if (call != null) { var holdCallAction = new CXSetHeldCallAction(call.UUID, false); var transaction = new CXTransaction(holdCallAction); SendTransactionRequest(transaction); } }
public void PlaceCallOnHold(ActiveCall call) { // Build action var holdCallAction = new CXSetHeldCallAction(call.UUID, true); // Create transaction var transaction = new CXTransaction(holdCallAction); // Inform system of call request SendTransactionRequest(transaction); }
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 StartCall(string contact) { // Build call action var handle = new CXHandle(CXHandleType.Generic, contact); var startCallAction = new CXStartCallAction(new NSUuid(), handle); // Create transaction var transaction = new CXTransaction(startCallAction); // Inform system of call request SendTransactionRequest(transaction); }
public ActiveCall StartCall(string name, int id) { var newCall = new ActiveCall(new NSUuid(), name, id, true, null, false); Calls.Add(newCall); var handle = new CXHandle(CXHandleType.Generic, name); var startCallAction = new CXStartCallAction(newCall.UUID, handle); var transaction = new CXTransaction(startCallAction); SendTransactionRequest(transaction); return(newCall); }
private void SendTransactionRequest(CXTransaction transaction) { CallController.RequestTransaction(transaction, (error) => { if (error == null) { Console.WriteLine("Transaction request sent successfully."); } else { Console.WriteLine("Error requesting transaction: {0}", error); } }); }
private void SendTransactionRequest(CXTransaction transaction) { // Send request to call controller CallController.RequestTransaction(transaction, (error) => { // Was there an error? if (error == null) { // No, report success Console.WriteLine("Transaction request sent successfully."); } else { // Yes, report error Console.WriteLine("Error requesting transaction: {0}", error); } }); }
public void StartCall(string contact) { // Build call action var handle = new CXHandle(CXHandleType.Generic, contact); //var handle = new CXHandle(CXHandleType.EmailAddress, contact); //var handle = new CXHandle(CXHandleType.PhoneNumber, contact); var thisCallID = new NSUuid(); Console.WriteLine("Call instance " + thisCallID + " generated for " + contact); var startCallAction = new CXStartCallAction(thisCallID, handle); // Create transaction var transaction = new CXTransaction(startCallAction); // Inform system of call request SendTransactionRequest(transaction); }
public static bool ExecuteTransaction(this ICXProviderDelegate This, CXProvider provider, CXTransaction transaction) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
public virtual Task RequestTransactionAsync(CXTransaction transaction) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
public virtual void RequestTransaction(CXTransaction transaction, Action <NSError> completion) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);
public virtual bool ExecuteTransaction(CXProvider provider, CXTransaction transaction) => throw new PlatformNotSupportedException(Constants.UnavailableOnMacOS);