Пример #1
0
 /// <summary>
 /// PUT /v1/calls/{uuid}/dtmf - send Dual-tone multi-frequency(DTMF) tones 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> StartDtmfAsync(string id, DtmfCommand cmd, Credentials creds = null)
 {
     return(ApiRequest.DoRequestWithJsonContentAsync <CallCommandResponse>(
                PUT,
                ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"{CALLS_ENDPOINT}/{id}/dtmf"),
                cmd,
                ApiRequest.AuthType.Bearer,
                creds ?? Credentials
                ));
 }
Пример #2
0
 public CallCommandResponse StartDtmf(string id, DtmfCommand cmd, Credentials creds = null)
 {
     return(StartDtmfAsync(id, cmd, creds).GetAwaiter().GetResult());
 }