Rate this page:

VoxEngine: a cloud app

If you want to create an application that works directly from the cloud, such as a calling or messaging application, an IVR or an automatic survey with voice synthesis and recognition, VoxEngine will help you with that.

VoxEngine is a cloud application runtime that allows developers to run their applications directly from the cloud. To start building your application, you need only a browser, JavaScript knowledge, and our documentation.

About VoxEngine

This article is about getting started with a cloud app. If you want to learn more about VoxEngine, its basic concepts and tips, refer to the VoxEngine section in Guides.

This guide will help you to build your first application on VoxEngine. In general, you need to:

  1. Create an application
  2. Create a scenario inside it
  3. Create a rule and attach it to the scenario
  4. Buy a phone number and attach it to the application
  5. Test the app

Now let us go through each step in details.

Application

Copy URL

Let us begin with an application. Go to the Voximplant control panel and log in to your account or create a new one. Then choose the application section from the menu in the upper left corner and click New application in the upper right corner or Create at the bottom of page:

Create an app

This opens the New application editor window where you set it up and confirm by clicking Create. The new app appears in the application list. To change its name, icon or description, click the three dots menu and select Edit.

Edit an app

With this done, we move to scenario creation.

Scenario

Copy URL

Open your newly created app, select Scenarios on the left menu, and click on the plus icon and give your scenario a name:

Create a scenario

This opens a new tab in the online IDE on the right. This is where you write your code. If needed, you can rename the scenario or change the source code later. Also, you can upload changes automatically via the Management API.

Now, give your scenario a name and add some code. Here is an example of what you can write there:

Sample code

Sample code

In this scenario, we play synthesized speech to a callee via the say method. But we test it after we create a rule and buy a phone number.

Rule

Copy URL

Let us move to the Rules section. Rules tell the platform which scenarios to execute when a call arrives at the platform or the StartScenarios API method is called. To create a rule, switch to the Routing tab of the application and either click Create in the center of the screen or New rule in the upper right corner:

Create a rule

This opens an editor where you can enter a rule name and select JavaScript scenarios. Name the rule ‘incoming’, for example, and choose the ‘myFirstScenario’ scenario in Available Scenarios. Then confirm the rule creation:

Assign a scenario

Phone number

Copy URL

The last thing we need to test our app is a phone number. You can rent a number from us and set your own CallerID, if you want to (not for test numbers). In this quickstart, we rent a test phone number accessible as an extension. On the Voximplant control panel, select My phone numbers on the left menu and then click Buy new phone number in the upper right corner:

Buy a number

The phone number interface is displayed. Select Test numbers, then select one or more test numbers and click Buy selected:

Phone numbers to buy

After you buy a number, you immediately see this number in the list. Associate a phone number with your application to execute your JavaScript code and play a voice greeting if the rented phone number is called. To do so, go to Applications, click on the needed application and switch to the Numbers tab. Here, click on the Available tab, select a number, and click Attach. Now you get to pick a routing rule: in this case, it can be the rule you created or all rules:

Attach a rule

Test call

Copy URL

Next you can make a call. Dial one of the access numbers displayed on the page and enter the number you bought as an extension when you hear the prompt.

How to call test numbers

When the connection is established, you hear a synthesized voice that reads a text – this is the Voximplant cloud that executed your JavaScript code and carried out your instructions. In case of errors, check the Voximplant JavaScript session log for details.

Each application session contains a log file with all calls in this session, both incoming and outgoing. You can access the log via control panel or via Management API. The session log TTL is 1 month. After 1 month you cannot access and download the session log.

I want to continue

Copy URL

Now you know how to create a basic working app. To add more functionality to it, follow our guides.