Ejemplo n.º 1
0
 /// <summary>
 /// PUT /v1/calls/{uuid}/stream - stream an audio file 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> StartStreamAsync(string id, StreamCommand command, Credentials creds = null)
 {
     return(ApiRequest.DoRequestWithJsonContentAsync <CallCommandResponse>(
                PUT,
                ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"{CALLS_ENDPOINT}/{id}/stream"),
                command,
                ApiRequest.AuthType.Bearer,
                creds ?? Credentials
                ));
 }
Ejemplo n.º 2
0
 public CallCommandResponse StartStream(string id, StreamCommand command, Credentials creds = null)
 {
     return(StartStreamAsync(id, command, creds).GetAwaiter().GetResult());
 }