/// <summary> /// Calls a phone and reads a message to the person who picks up. /// </summary> /// <param name="itemId">The Id of the message to read.</param> /// <param name="dialString">The full dial string used to call the phone.</param> /// <returns>An object providing status for the phone call.</returns> public PhoneCall PlayOnPhone(ItemId itemId, string dialString) { EwsUtilities.ValidateParam(itemId, "itemId"); EwsUtilities.ValidateParam(dialString, "dialString"); PlayOnPhoneRequest request = new PlayOnPhoneRequest(service); request.DialString = dialString; request.ItemId = itemId; PlayOnPhoneResponse serviceResponse = request.Execute(); PhoneCall callInformation = new PhoneCall(service, serviceResponse.PhoneCallId); return callInformation; }
/// <summary> /// Calls a phone and reads a message to the person who picks up. /// </summary> /// <param name="itemId">The Id of the message to read.</param> /// <param name="dialString">The full dial string used to call the phone.</param> /// <returns>An object providing status for the phone call.</returns> public PhoneCall PlayOnPhone(ItemId itemId, string dialString) { EwsUtilities.ValidateParam(itemId, "itemId"); EwsUtilities.ValidateParam(dialString, "dialString"); PlayOnPhoneRequest request = new PlayOnPhoneRequest(service); request.DialString = dialString; request.ItemId = itemId; PlayOnPhoneResponse serviceResponse = request.Execute(); PhoneCall callInformation = new PhoneCall(service, serviceResponse.PhoneCallId); return(callInformation); }
/// <summary> /// Calls a phone and reads a message to the person who picks up. /// </summary> /// <param name="itemId">The Id of the message to read.</param> /// <param name="dialString">The full dial string used to call the phone.</param> /// <returns>An object providing status for the phone call.</returns> public async Task <PhoneCall> PlayOnPhone(ItemId itemId, string dialString, CancellationToken token = default(CancellationToken)) { EwsUtilities.ValidateParam(itemId, "itemId"); EwsUtilities.ValidateParam(dialString, "dialString"); PlayOnPhoneRequest request = new PlayOnPhoneRequest(service); request.DialString = dialString; request.ItemId = itemId; PlayOnPhoneResponse serviceResponse = await request.Execute(token).ConfigureAwait(false); PhoneCall callInformation = new PhoneCall(service, serviceResponse.PhoneCallId); return(callInformation); }