/// <summary> /// PUT /v1/calls/{uuid}/talk - send a synthesized speech message to an active Call /// </summary> /// <param name="id">id of call</param> /// <param name="cmd">Command to execute against call</param> /// <param name="creds">(Optional) Overridden credentials for only this request</param> /// <exception cref="VonageHttpRequestException">thrown if an error is encountered when talking to the API</exception> public Task <CallCommandResponse> StartTalkAsync(string id, TalkCommand cmd, Credentials creds = null) { return(ApiRequest.DoRequestWithJsonContentAsync <CallCommandResponse>( PUT, ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"{CALLS_ENDPOINT}/{id}/talk"), cmd, ApiRequest.AuthType.Bearer, creds ?? Credentials )); }
public CallCommandResponse StartTalk(string id, TalkCommand cmd, Credentials creds = null) { return(StartTalkAsync(id, cmd, creds).GetAwaiter().GetResult()); }