private void SendURLToCV(string URL, string xmlPage)
        {
            try
            {
                log.Info(String.Format("{0} - in SendURLToCV", ANI));

                var clientUrl = new ClientUrl();
                clientUrl.url = URL;
                log.Info(String.Format("{0} - Going to post {1} to {2}", ANI, clientUrl.url, SessionUri.AbsoluteUri));
                Client.PostAsJsonAsync<ClientUrl>(SessionUri.AbsoluteUri, clientUrl).ContinueWith(
                    task =>
                    {
                        log.Info(String.Format("{0} - inside SendURLToCV task", ANI));
                        if (task.Exception != null)
                        {
                            log.Info(String.Format("{0} - POST {1} application/json failed! Error: {2}",
                                                          ANI,
                                                          SessionUri.AbsoluteUri,
                                                          task.Exception.InnerException.Message));
                            RedirectTwilio(signalURI + "/main-menu.xml");
                        }
                        else if (!task.Result.IsSuccessStatusCode)
                        {
                            var msg = task.Result.Content.ReadAsStringAsync().Result;
                            log.Info(String.Format("{0} - Post {1} application/json failed! Reason - {2}, {3}, {4}",
                                ANI,
                                SessionUri.AbsoluteUri,
                                task.Result.StatusCode,
                                task.Result.ReasonPhrase,
                                msg));
                            RedirectTwilio(signalURI + "/main-menu.xml");
                        }
                        else
                        {
                            RedirectTwilio(signalURI + "/" + xmlPage);
                        }
                    });
            }
            catch (UriFormatException ex)
            {
                log.Error(String.Format("{0} - Bad API server address - " + ex.Message, ANI));
                RedirectTwilio(signalURI + "/main-menu.xml");
            }
            log.Info(String.Format("{0} - leaving SendURLToCV", ANI));
        }
        private void ContinueCVSession()
        {
            try
            {
                log.Info(String.Format("{0} - in ContinueCVSession", ANI));

                var clientUrl = new ClientUrl();
                clientUrl.url = "http://cvnet.radishsystems.com/choiceview/ivr/twilio_main_menu.html";
                log.Info(String.Format("{0} - Going to post {1} to {2}", ANI, clientUrl.url, SessionsUri.AbsoluteUri));
                Client.PostAsJsonAsync<ClientUrl>(SessionUri.AbsoluteUri, clientUrl).ContinueWith(
                    task =>
                    {
                        log.Info(String.Format("{0} - inside ContinueCVSession task", ANI));
                        if (task.Exception != null)
                        {
                            log.Info(String.Format("{0} - POST {1} application/json failed!\nError: {2}",
                                                          ANI,
                                                          SessionUri.AbsoluteUri,
                                                          task.Exception.InnerException.Message));
                            RedirectTwilio(signalURI + "/main-menu.xml");
                        }
                        else if (!task.Result.IsSuccessStatusCode)
                        {
                            var msg = task.Result.Content.ReadAsStringAsync().Result;
                            log.Info(String.Format("{0} - Post {1} application/json failed! Reason - {2}, {3}, {4}",
                                ANI,
                                SessionUri.AbsoluteUri,
                                task.Result.StatusCode,
                                task.Result.ReasonPhrase,
                                msg));
                            RedirectTwilio(signalURI + "/main-menu.xml");
                        }
                        else
                        {
                            RedirectTwilio(signalURI + "/CVMain.xml");
                        }
                    });
            }
            catch (UriFormatException ex)
            {
                log.Error(String.Format("{0} - Bad API server address - " + ex.Message, ANI));
            }
            log.Info(String.Format("{0} - leaving ContinueCVSession", ANI));
        }