public RecordActionServiceTests(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new RecordActionService();

            this.createOptions = new RecordStartOptions()
            {
                ClientState = "aGF2ZSBhIG5pY2UgZGF5ID1d",
                CommandId   = new System.Guid("891510ac-f3e4-11e8-af5b-de00688a4901"),
                Channels    = RecordStartOptions.ChannelEnum.DualEnum,
                Format      = RecordStartOptions.FormatEnum.Mp3Enum,
                PlayBeep    = false,
            };

            this.options = new RecordActionOptions
            {
                ClientState = "aGF2ZSBhIG5pY2UgZGF5ID1d",
                CommandId   = new System.Guid("891510ac-f3e4-11e8-af5b-de00688a4901"),
            };
        }
        public TelnyxApiResponse RecordStart()
        {
            TelnyxApiResponse  response = new TelnyxApiResponse();
            RecordStartOptions options  = new RecordStartOptions
            {
            };

            Console.WriteLine(JsonConvert.SerializeObject(options));

            try
            {
                response = callControlService.RecordStart(options);
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
            catch (TelnyxException ex)
            {
                Console.WriteLine("exception");
                Console.WriteLine(JsonConvert.SerializeObject(ex));
            }
            return(response);
        }
Example #3
0
 public virtual async Task <TelnyxApiResponse> RecordStartAsync(RecordStartOptions options, RequestOptions requestOptions = null, CancellationToken ct = default)
 {
     return(await this.recordActionService.StartAsync(this.CallControlId, options, requestOptions, ct));
 }
Example #4
0
 public virtual TelnyxApiResponse RecordStart(RecordStartOptions options, RequestOptions requestOptions = null)
 {
     return(this.recordActionService.Start(this.CallControlId, options, requestOptions));
 }