Пример #1
0
        /// <summary>
        /// Action Method that returns the TwiML needed to connect an 'Agent' to the first call in the Queue
        /// </summary>
        /// <remarks>This method also includes the 'url' parameter in the generated TwiML.  This allows you to provide a URL that can return TwiML that will be executed to the dequeued caller as a Whisper</remarks>
        /// <returns></returns>
        public ActionResult Dial()
        {
            var response = new TwilioResponse();

            response.DialQueue("Demo Queue", new { url = Url.Action("Connect") }, new { });

            return(TwiML(response));
        }
Пример #2
0
        //
        // GET: /Phone/

        public ActionResult ConnectToFirstQueueMember()
        {
            var response = new TwilioResponse();

            response.DialQueue("CustomerServiceQueue", null);

            return(TwiML(response));
        }
Пример #3
0
        public ActionResult BasicDequeue()
        {
            var response = new TwilioResponse();

            response.Say("Now transporting into a phone call with a fellow adventurer.  Say hello when you get there.");
            response.DialQueue("twilioquestchapter10", new { timeout = "5" });  //TODO: need to add a overload here

            response.Say("Looks like there are not any adventures waiting right now.  Try later.");
            return(TwiML(response));
        }