예제 #1
0
        public override VoipCall Call(string to, string contactId = null)
        {
            var scenario = provider.StartScenario(((VoxImplantSettings)Settings).Rule.RuleID);

            var tempRestClient = new RestClient(scenario.MediaSessionAccessURL);

            var request = new RestRequest {
                Method = Method.POST
            };

            request.AddParameter("destination", to);
            request.AddParameter("from", Number);

            var call = tempRestClient.Execute <VoxImplantBaseResponse>(request);

            VoxImplantProvider.ThrowIfError(call.Data);

            return(new VoipCall {
                Id = call.Content, From = Number, To = to
            });
        }
예제 #2
0
 public VoxImplantPhone(VoxImplantProvider provider)
 {
     this.provider = provider;
 }