Rate this page:

VoxEngine concepts

Voximplant has a JS-based core called VoxEngine which processes calls on the basis of JS scenarios and works with the latest ECMAScript syntax.

Event-based model

Copy URL

The scenarios are based on the event-driven model, which means that developers can easily manipulate calls and track all the changes during a conversation by subscribing to events.

Session lifecycle

Copy URL

Every attempt to start a call using Voximplant creates a new independent call session in VoxEngine; except for conferences, in this case, the call goes into an existing session.

  • A session always starts with the Started event due to an incoming call or an HTTP request.

  • The next event depends on what started a session: it can be the CallAlerting event in case of a call or the HttpRequest event in case of an HTTP request.

  • The CallEvents can be triggered during a session: when a call is connected or when it is put on hold, when call recording is started, and so on.

Normally, the session’s ending is executed in the next steps:

  1. The terminate method is called, an error occurs, or a session ends after timeout if there are no active calls and ACD requests.
  2. The Terminating event is triggered. Timers and any other external resources are not available after this event is triggered, but you can perform one HTTP request inside the event handler (e.g., to notify an external system about the fact that the session is finished). When that request is finished.
  3. The Terminated event is triggered.

A session without calls and ACD requests is terminated after 60 seconds.

To learn about sessions limits, check out the Limits and restrictions article.

Standard library

Copy URL

VoxEngine supports basic functions such as setTimeout, clearTimeout, str2Bytes, base64_encode, uuidgen, a set of crypto methods, etc. But they can be slightly different from their originals even in the names. Please look them up in the VoxEngine reference before using to make your scenario work properly.


Copy URL

Use the Logger.write method to write messages to the session logger.

When a session terminates, its log immeditately becomes available in Call history. To access it, you can either go to the Calls section in the Control panel or use the GetCallHistory API method. Retrieving logs via the Control panel, you gets access to a handful visual representation:


Key features

  • Copying a log itself or the link to it to the clipboard

  • Downloading logs in the .txt format – see the button in the the top right corner

  • Events and their time codes are highlighted for readability

  • Navigating through long logs with the help of a minimap in the top right corner

  • Hiding any of a call's sides (legs) for more convenient analysis – unfold the needed leg the left side of the screen and uncheck the Highlight call lines box there.