コード例 #1
0
        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"),
            };
        }
コード例 #2
0
        public TelnyxApiResponse RecordStop()
        {
            TelnyxApiResponse   response = new TelnyxApiResponse();
            RecordActionOptions options  = new RecordActionOptions
            {
            };

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

            try
            {
                response = callControlService.RecordStop(options);
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
            catch (TelnyxException ex)
            {
                Console.WriteLine("exception");
                Console.WriteLine(JsonConvert.SerializeObject(ex));
            }
            return(response);
        }
コード例 #3
0
 public virtual async Task <TelnyxApiResponse> RecordResumeAsync(RecordActionOptions options, RequestOptions requestOptions = null, CancellationToken ct = default)
 {
     return(await this.recordActionService.ResumeAsync(this.CallControlId, options, requestOptions, ct));
 }
コード例 #4
0
 public virtual TelnyxApiResponse RecordResume(RecordActionOptions options, RequestOptions requestOptions = null)
 {
     return(this.recordActionService.Resume(this.CallControlId, options, requestOptions));
 }