/// <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="NexmoHttpRequestException">thrown if an error is encountered when talking to the API</exception>
 public CallCommandResponse StartDtmf(string id, DtmfCommand cmd, Credentials creds = null)
 {
     return(ApiRequest.DoRequestWithJsonContent <CallCommandResponse>(
                PUT,
                ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"{CALLS_ENDPOINT}/{id}/dtmf"),
                cmd,
                ApiRequest.AuthType.Bearer,
                creds ?? Credentials
                ));
 }
示例#2
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>
 public static CallCommandResponse SendDtmf(string id, DtmfCommand cmd, Credentials creds = null)
 {
     return(ApiRequest.DoRequestWithJsonContent <CallCommandResponse>("PUT", ApiRequest.GetBaseUriFor(typeof(Call), $"/v1/calls/{id}/dtmf"), cmd, ApiRequest.AuthType.Bearer, creds));
 }
示例#3
0
        /// <summary>
        /// PUT /v1/calls/{uuid}/dtmf - send Dual-tone multi-frequency(DTMF) tones to an active Call
        /// </summary>
        public static CallCommandResponse SendDtmf(string id, DtmfCommand cmd)
        {
            var response = VersionedApiRequest.DoRequest("PUT", ApiRequest.GetBaseUriFor(typeof(Call), $"/v1/calls/{id}/dtmf"), cmd);

            return(JsonConvert.DeserializeObject <CallCommandResponse>(response.JsonResponse));
        }