public CallControlRejectServiceTest(MockHttpClientFixture mockHttpClientFixture) : base(mockHttpClientFixture) { this.service = new CallControlRejectService(); this.createOptions = new CallControlRejectOptions() { ClientState = "aGF2ZSBhIG5pY2UgZGF5ID1d", CommandId = new System.Guid("891510ac-f3e4-11e8-af5b-de00688a4901"), Cause = CallControlRejectOptions.RejectCauseEnum.CALLREJECTED }; }
public CallRejectResponse Reject() { CallRejectResponse response = new CallRejectResponse(); CallControlRejectOptions options = new CallControlRejectOptions { }; Console.WriteLine(JsonConvert.SerializeObject(options)); try { response = callControlService.Reject(options); Console.WriteLine(JsonConvert.SerializeObject(response)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } return(response); }
public virtual async Task <CallRejectResponse> RejectAsync(CallControlRejectOptions options, string postFix = "actions/reject", RequestOptions requestOptions = null, CancellationToken ct = default) { return(await this.callControlRejectService.CreateAsync(this.CallControlId, options, postFix, requestOptions, ct)); }
public virtual CallRejectResponse Reject(CallControlRejectOptions options, string postFix = "actions/reject", RequestOptions requestOptions = null) { return(this.callControlRejectService.Create(this.CallControlId, options, postFix, requestOptions)); }