public CallControlHangupServiceTest(MockHttpClientFixture mockHttpClientFixture) : base(mockHttpClientFixture) { this.service = new CallControlHangupService(); this.createOptions = new CallControlHangupOptions() { ClientState = "aGF2ZSBhIG5pY2UgZGF5ID1d", CommandId = new System.Guid("891510ac-f3e4-11e8-af5b-de00688a4901") }; }
public CallHangUpResponse Hangup() { CallHangUpResponse response = new CallHangUpResponse(); CallControlHangupOptions options = new CallControlHangupOptions { }; Console.WriteLine(JsonConvert.SerializeObject(options)); try { response = callControlService.HangUp(options); Console.WriteLine(JsonConvert.SerializeObject(response)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } return(response); }
public virtual async Task <CallHangUpResponse> HangUpAsync(CallControlHangupOptions options, string postFix = "actions/hangup", RequestOptions requestOptions = null, CancellationToken ct = default) { return(await this.callControlHangupService.CreateAsync(this.CallControlId, options, postFix, requestOptions, ct)); }
public virtual CallHangUpResponse HangUp(CallControlHangupOptions options, string postFix = "actions/hangup", RequestOptions requestOptions = null) { return(this.callControlHangupService.Create(this.CallControlId, options, postFix, requestOptions)); }