static private async Task call_ringout() { var parameters = new MakeRingOutRequest(); parameters.from = new MakeRingOutCallerInfoRequestFrom { phoneNumber = Environment.GetEnvironmentVariable("RC_USERNAME") }; parameters.to = new MakeRingOutCallerInfoRequestTo { phoneNumber = Environment.GetEnvironmentVariable("RINGOUT_RECIPIENT") }; parameters.playPrompt = false; var resp = await restClient.Restapi().Account().Extension().RingOut().Post(parameters); Console.WriteLine("Call Placed. Call status" + resp.status.callStatus); }
/// <summary> /// Makes a 2-leg RingOut call. /// HTTP Method: post /// Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/ring-out /// Rate Limit Group: Heavy /// App Permission: RingOut /// </summary> public async Task <GetRingOutStatusResponse> Post(MakeRingOutRequest makeRingOutRequest, RestRequestConfig restRequestConfig = null) { return(await rc.Post <GetRingOutStatusResponse>(Path(false), makeRingOutRequest, null, restRequestConfig)); }