Skip to content

IVR Application Demo

Make a call to a fictitious logistics company either using WebRTC or from your phone, and watch the application code unfold as it handles your call:

  • REST API:            

    Python REST API

    Create telephony applications quickly and easily using Aculab Cloud's REST API. Using our simple JSON language wrapper, you'll be able to call Cloud Actions such as Play() and Record(), helping you to write your interactive telephony application.

    IVR applications can be created using the RunMenu() Action, allowing you to ask questions (using wav files or TTS), get answers from the telephone keypad and drive your application flow depending on those answers.

    Each of the links above above is a web page that our application uses when required. To see how it works, call in using WebRTC or from your phone, and watch the application code unfold as it handles your call.

    list_of_actions = []
    list_of_actions.append(Play(text_to_say="Hello and welcome to "
                                            "the Aculab Cloud Logistics "
                                            "IVR system."))
    list_of_actions.append(Redirect(WebPage(url="after_intro")))
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    
    list_of_actions = []
    list_of_actions.append(Play(text_to_say="Main menu."))
    
    menu_options = []
    menu_options.append(MenuOption('1', WebPage(url="opening_times")))
    menu_options.append(MenuOption('2', WebPage(url="location_package")))
    menu_options.append(MenuOption('3', WebPage(url="connect_agent")))
    main_menu = RunMenu(menu_options)
    
    menu_text = ("Press 1 to hear our store location and opening times, "
                 "press 2 to find the location of your package, "
                 "or press 3 to talk to one of our highly experienced "
                 "and friendly agents. At any time, just hit star to "
                 "hear the options again.")
    main_menu.set_prompt(Play(text_to_say=menu_text))
    
    list_of_actions.append(main_menu)
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    
    list_of_actions = []
    list_of_actions.append(Play(text_to_say="At Aculab Cloud Logistics "
                                            "our working hours are "
                                            "Monday to Friday, "
                                            "9 a.m. to 5 p.m."))
    list_of_actions.append(Redirect(WebPage(url="after_intro")))
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    
    list_of_actions = []
    my_number = GetNumber(WebPage(url="location_package_process"))
    my_number.set_prompt(Play(text_to_say="Please enter the four "
                                          "digit package number you would "
                                          "like to locate. "
                                          "For demonstration "
                                          "purposes, you can enter any "
                                          "four digit number."))
    my_number.set_digit_count(4)
    list_of_actions.append(my_number)
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    
    my_request = TelephonyRequest(request)
    action_result = my_request.get_action_result()
    get_number_result =  action_result.get("result")
    entered_number = get_number_result.get("entered_number")
    
    msg = ("Package " + ','.join(entered_number) + " was signed for "
           "by Bob yesterday at 3:30 p.m.")
    list_of_actions = []
    list_of_actions.append(Play(text_to_say=msg))
    list_of_actions.append(Redirect(WebPage(url="after_intro")))
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    
    list_of_actions = []
    my_connect = Connect()
    my_connect.set_destinations(["sip:agent_ivr@sip-1-2-0.aculab.com"])
    my_connect.set_hold_media(Play(text_to_say="All of our operators are "
                                               "currently busy. Your call "
                                               "is important to us. Please "
                                               "hold the line, and an agent "
                                               "will answer shortly."))
    list_of_actions.append(my_connect)
    list_of_actions.append(Redirect(WebPage(url="after_intro")))
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    
    list_of_actions = []
    list_of_actions.append(Play(text_to_say="Hello, my name is Joey from "
                                            "Aculab Cloud Logistics. "
                                            "It's quite possible to connect "
                                            "your inbound application to "
                                            "another person using conferencing "
                                            "or using an outbound telephone "
                                            "call."))
    list_of_actions.append(Play(text_to_say="I hope I've been able to help you "
                                            "with your inquiry. Thank you for "
                                            "using Aculab Cloud Logistics."))
    
    my_response = TelephonyResponse(list_of_actions)
    return my_response.get_json()
    

    C# REST API

    Create telephony applications quickly and easily using Aculab Cloud's REST API. Using our simple JSON language wrapper, you'll be able to call Cloud Actions such as Play() and Record(), helping you to write your interactive telephony application.

    IVR applications can be created using the RunMenu() Action, allowing you to ask questions (using wav files or TTS), get answers from the telephone keypad and drive your application flow depending on those answers.

    Each of the links above above is a web page that our application uses when required. To see how it works, call in using WebRTC or from your phone, and watch the application code unfold as it handles your call.

    List<TelephonyAction> actions = new List<TelephonyAction>();
    Play playAction = Play.SayText("Hello and welcome to the " +
        "Aculab Cloud Logistics IVR system.");
    actions.Add(playAction);
    actions.Add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    
    List<TelephonyAction> actions = new List<TelephonyAction>();
    Play playAction = Play.SayText("Main menu.");
    actions.Add(playAction);
    
    List<MenuOption> options = new List<MenuOption>
    {
        new MenuOption('1', new WebPageRequest("opening_times")),
        new MenuOption('2', new WebPageRequest("location_package")),
        new MenuOption('3', new WebPageRequest("connect_agent")),
    };
    RunMenu menu = new RunMenu(options);
    menu.Prompt = Play.SayText("Press 1 to hear our store " +
        "location and opening times, press 2 to find the " +
        "location of your package, or press 3 to talk to one " +
        "of our highly experienced and friendly agents. At " +
        "any time, just hit star to hear the options again.");
    actions.Add(menu);
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    
    List<TelephonyAction> actions = new List<TelephonyAction>();
    Play playAction = Play.SayText("At Aculab Cloud Logistics " +
                        "our working hours are " +
                        "Monday to Friday, 9 a.m. to 5 p.m.");
    actions.Add(playAction);
    
    actions.Add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    
    List<TelephonyAction> actions = new List<TelephonyAction>();
    Play prompt = Play.SayText("Please enter the four digit " +
                                "package number you would like to locate. " +
                                "For demonstration purposes, " +
                                "you can enter any four digit number.");
    WebPageRequest nextPage = new WebPageRequest("location_package_process");
    GetNumber getNumber = new GetNumber(nextPage, prompt, 4);
    actions.Add(getNumber);
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    
    TelephonyRequest ourRequest = new TelephonyRequest(Request);
    InstanceInfo instanceInfo = ourRequest.InstanceInfo;
    GetNumberResult result = (GetNumberResult)instanceInfo.ActionResult;
    String enteredNumber = result.EnteredNumber;
    
    List<TelephonyAction> actions = new List<TelephonyAction>();
    Play playAction = Play.SayText("Package " +
        String.Join(",", enteredNumber.ToCharArray()) +
        " was signed for by Bob yesterday at 3:30 p.m.");
    actions.Add(playAction);
    
    actions.Add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    
    List<TelephonyAction> actions = new List<TelephonyAction>();
    Connect connect = new Connect("sip:agent_ivr@sip-1-2-0.aculab.com");
    connect.HoldMedia = Play.SayText("All of our operators are " +
        "currently busy. Your call is important to us. Please " +
        "hold the line, and an agent will answer shortly.");
    actions.Add(connect);
    actions.Add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    
    List<TelephonyAction> actions = new List<TelephonyAction>();
    Play playAction = Play.SayText("Hello, my name is Joey " +
        "from Aculab Cloud Logistics. It's quite possible to " +
        "connect your inbound application to another person " +
        "using conferencing or using an outbound telephone call.");
    actions.Add(playAction);
    
    playAction = Play.SayText("I hope I've been able to help " +
        "you with your inquiry. Thank you for using Aculab " +
        "Cloud Logistics.");
    actions.Add(playAction);
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.ToHttpResponse(Response);
    

    Java REST API

    Create telephony applications quickly and easily using Aculab Cloud's REST API. Using our simple JSON language wrapper, you'll be able to call Cloud Actions such as Play() and Record(), helping you to write your interactive telephony application.

    IVR applications can be created using the RunMenu() Action, allowing you to ask questions (using wav files or TTS), get answers from the telephone keypad and drive your application flow depending on those answers.

    Each of the links above above is a web page that our application uses when required. To see how it works, call in using WebRTC or from your phone, and watch the application code unfold as it handles your call.

    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    actions.add(Play.sayText("Hello and welcome to " +
                             "the Aculab Cloud Logistics " +
                             "IVR system."));
    actions.add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    
    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    actions.add(Play.sayText("Main menu."));
    
    Play prompt = Play.sayText("Press 1 to hear our store location and " +
        "opening times, press 2 to find the location of your package, " +
        "or press 3 to talk to one of our highly experienced and friendly " +
        "agents. At any time, just hit star to hear the options again.");
    
    List<MenuOption> options = new ArrayList<MenuOption>();
    options.add(new MenuOption('1', new WebPageRequest("opening_times")));
    options.add(new MenuOption('2', new WebPageRequest("location_package")));
    options.add(new MenuOption('3', new WebPageRequest("connect_agent")));
    RunMenu runMenuAction = new RunMenu(options);
    runMenuAction.setPrompt(prompt);
    actions.add(runMenuAction);
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    
    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    actions.add(Play.sayText("At Aculab Cloud Logistics " +
                             "our working hours are " +
                             "Monday to Friday, " +
                             "9 a.m. to 5 p.m."));
    actions.add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    
    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    Play prompt = Play.sayText("Please enter the four digit package " +
                    "number you would like to locate. " +
                    "For demonstration purposes, you can " +
                    "enter any four digit number.");
    WebPageRequest nextPage = new WebPageRequest("location_package_process");
    actions.add(new GetNumber(nextPage, prompt, 4));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    
    TelephonyRequest ourRequest = new TelephonyRequest(request);
    InstanceInfo instanceInfo = ourRequest.getInstanceInfo();
    GetNumberResult numberResult = (GetNumberResult)instanceInfo.getActionResult();
    String enteredNumber = numberResult.getEnteredNumber();
    
    String msg = "Package " +
        StringUtils.join(enteredNumber.toCharArray(), ',') + 
        " was signed for by Bob yesterday at 3:30 p.m.";
    
    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    actions.add(Play.sayText(msg));
    actions.add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    
    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    Connect connectAction = new Connect("sip:agent_ivr@sip-1-2-0.aculab.com");
    connectAction.setHoldMedia(Play.sayText("All of our operators are " +
        "currently busy. Your call is important to us. Please hold the " +
        "line, and an agent will answer shortly."));
    actions.add(connectAction);
    actions.add(new Redirect(new WebPageRequest("after_intro")));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    
    List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
    actions.add(Play.sayText("Hello, my name is Joey from Aculab Cloud " +
        "Logistics. It's quite possible to connect your inbound " +
        "application to another person using conferencing or using an " +
        "outbound telephone call."));
    actions.add(Play.sayText("I hope I've been able to help you with your " +
        "inquiry. Thank you for using Aculab Cloud Logistics."));
    
    TelephonyResponse ourResponse = new TelephonyResponse(actions);
    ourResponse.setHttpServletResponse(response);
    

    PHP REST API

    Create telephony applications quickly and easily using Aculab Cloud's REST API. Using our simple JSON language wrapper, you'll be able to call Cloud Actions such as Play() and Record(), helping you to write your interactive telephony application.

    IVR applications can be created using the RunMenu() Action, allowing you to ask questions (using wav files or TTS), get answers from the telephone keypad and drive your application flow depending on those answers.

    Each of the links above above is a web page that our application uses when required. To see how it works, call in using WebRTC or from your phone, and watch the application code unfold as it handles your call.

    $my_response = new Response();
    $my_response->addAction(Play::sayText("Hello and welcome " .
    "to the Aculab Cloud Logistics IVR system."));
    $my_response->addAction(new Redirect("after_intro"));
    
    print $my_response;
    
    $my_response = new Response();
    $my_response->addAction(Play::sayText("Main menu."));
    $menu_text = Play::sayText("Press 1 to hear our store " .
    "location and opening times, press 2 to find the location " .
    "of your package, or press 3 to talk to one of our highly " .
    "experienced and friendly agents. At any time, just hit " .
    "star to hear the options again.");
    $main_menu = new RunMenu();
    $main_menu->setPrompt($menu_text);
    $main_menu->addMenuOption('1', "opening_times");
    $main_menu->addMenuOption('2', "location_package");
    $main_menu->addMenuOption('3', "connect_agent");
    $my_response->addAction($main_menu);
    
    print $my_response;
    
    $my_response = new Response();
    $my_response->addAction(Play::sayText("At Aculab Cloud Logistics " .
                    "our working hours are Monday to Friday, " .
                    "9 a.m. to 5 p.m."));
    $my_response->addAction(new Redirect("after_intro"));
    
    print $my_response;
    
    $my_response = new Response();
    $get_number = new GetNumber("location_package_process");
    $get_number->setPrompt(Play::sayText("Please enter the four " .
            "digit package number you would like to locate. " .
            "For demonstration purposes, " .
            "you can enter any four digit number."));
    $get_number->setDigitCount(4);
    $my_response->addAction($get_number);
    
    print $my_response;
    
    $instance_info = InstanceInfo::getInstanceInfo();
    $entered_number = $instance_info->getActionResult()->getEnteredNumber();
    $msg = 'Package ' . implode(',', str_split($entered_number)) . 
    " was signed for by Bob yesterday at 3:30 p.m.";
    $my_response = new Response();
    $my_response->addAction(Play::sayText($msg));
    $my_response->addAction(new Redirect("after_intro"));
    
    print $my_response;
    
    $my_response = new Response();
    $connect = new Connect();
    $connect->addDestination("sip:agent_ivr@sip-1-2-0.aculab.com");
    $connect->setHoldMedia(Play::sayText("All of our operators are " .
    "currently busy. Your call is important to us. Please hold the " .
    "line, and an agent will answer shortly."));
    $my_response->addAction($connect);
    $my_response->addAction(new Redirect("after_intro"));
    
    print $my_response;
    
    $my_response = new Response();
    $my_response->addAction(Play::sayText("Hello, my name is Joey from " .
    "Aculab Cloud Logistics. It's quite possible to connect your inbound " .
    "application to another person using conferencing or using an outbound " .
    "telephone call."));
    $my_response->addAction(Play::sayText("I hope I've been able to help you " .
    "with your inquiry. Thank you for using Aculab Cloud Logistics."));
    
    print $my_response;
    
  • WebRTC

    1 2 3

    4 5 6

    7 8 9

    * 0 #


    Phone

    Phone one of the numbers below and, when prompted, enter the token number:



    United Kingdom: +44 (0)845 5281354
    USA, DC, Washingdon: +1 202 888 0184
    USA, CA, Los Angeles: +1 323 790 6820