Exemplo n.º 1
0
        public static async Task <POSTResponse> StartCall(Contact contact)
        {
            POSTCall call = new POSTCall(App.UserSettings.ClientID, App.UserSettings.AccessToken, "dial", App.UserSettings.Extension);

            call.to.phonebook_id = contact.Id;
            call.to.number       = contact.PhoneNumberOne;
            return(await PostCall(call));
        }
Exemplo n.º 2
0
        public static async Task <POSTResponse> PostCall(POSTCall c)
        {
            var response = await ExecuteAuthorizedPost("calls", c);

            if (response.StatusCode != HttpStatusCode.OK)
            {
                return(null);
            }

            Console.WriteLine(response.Content);
            var ContactsResponse = JsonConvert.DeserializeObject <POSTResponse>(response.Content);

            return(ContactsResponse);
        }