IVR Builder Introduction - Next Steps
Back to Articles
Tutorial Voice Mail IVR Howto Guide

IVR Builder Introduction - Next Steps

March 7, 2019 4 min
Aivis Olsteins

Aivis Olsteins

In the previous post related to IVR Builder I showed quick example how to create a simple voice mail application with few quick commands. This is not the most sophisticated thing in the world, however gives some basic idea of how IVR Builder works. It shows how to use some basic building blocks like:

  1. Text to speech;
  2. Voice recording;
  3. Sending email with recordings attached.

Let's extend it a liite bit more: lets allow us (the owner of the mailbox) to dial in, browse the messages, listen to them and to optionally delete them.

First I want to introduce two data types we have in IVR Builder and which will be handy: arrays and objects.

  1. Arrays. Pretty much resemble Arrays is Javascript: useful to store multiple values in one value. Like this: var fruits= ["apple", "banana", "orange"];. Also, like in Javascript, you can retrieve any of them by its index (starting from 0 of course): fruits[1] will be "banana".
  2. Objects. Somehow silimar to Objects in Javascipt as well. Useful to define a set of properties of something (well, an object) which has them. Like this: var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"}; (example from the link).

Both of these types are useful also because IVR Builder can store them directly into it's local database where it can be retrieved by later action, for example, when the owner of the mail box dials in to listen for the messages.

These two types will be useful because we will use them to store information about each call: caller Id and location of the recording.

Let's reuse our previous piece of code from the previous post of download it directly from here. Remember, you can upload it into IVR Builder and continue editing in place.

Here are the steps we will do once user has left the voice mail:

  1. Create an object of the call, with caller_id and recording file name as their properties: var $msg_obj = {'filename':$recording,'caller':$caller};
  2. Generate random ID for the call, so we have a key under which the message is stored.
  3. Write the call object into local database, with the key generated in step 2.
  4. We also need to write a key in a separate array (let's call is 'messages' so we know how many messages we have and what are they keys). Let's retrive it from the database first.
  5. Append the key which we genarated in step 2 to the arry from step 4
  6. Store the new array in the database , with the same name 'messages'.

The additional blocks look like this:

{$image1}

Now we should make a separate functionality for an owner of the mailbox. For sake of simplicity in this example we will identify them by caller ID. That is not, however, recommended in production systems, because caller ID can be easily spoofed. Password protection at least is recommended.

Enter IF block:

{$image2}

Inside of this block we will do all actions needed to replay voice mail:

  1. Perhaps play some welcome message (use TTS, as shown earlier)
  2. Retrieve an array of message IDs from the storage. Remember, we agreed array will be named 'messages'
  3. Now use FOR block to loop over each of the elements in the array. They are essentialy Ids of individual messages, so for each of them we can:Retrieve message object by its key
  4. Get the Caller ID which we stored uder attribute 'caller' (see above, recording, step 1)
  5. Synthesize TTS message which can play caller ID. Hint: use say_as="digits" to play numbers digit by digit rather than whole numbers
  6. Get the location of the message file from 'filename' attribute and use it in Play File step.
  7. End it here.

{$image3}

That is basically it. A very simple voice mail with access and playback which we got working by adding a dozen of blocks.

As always if something does not work or you have difficulties to understand thsi guide, you are welcome to ask our Support and we will be happy to help you anytime.

If you have difficulties building tis flow, you can download it from our IVR Flows collection in our Documentation page. Just use "Import Flow" in your flows section to upload it.

 

 

 

Share this article

Aivis Olsteins

Aivis Olsteins

An experienced telecommunications professional with expertise in network architecture, cloud communications, and emerging technologies. Passionate about helping businesses leverage modern telecom solutions to drive growth and innovation.

Related Articles

Case Study: Global Communications Company

Case Study: Global Communications Company

A leading communications company used our cloud Voice platform to send 30 million OTP calls per month to their customers, resulting in cost reduction and incrased conversion

Read Article
Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Conversational AI struggles with the time gap between text generation and speech synthesis. A “backpressure” mechanism, akin to network data flow control, could slow text generation to match speech synthesis speed, improving user interaction.

Read Article
How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

AI voice agents transform healthcare scheduling by reducing costs, administrative tasks, and no-shows. They offer 24/7 service, multilingual support, proactive reminders, and valuable insights, improving efficiency and patient experiences.

Read Article
How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

Larger context windows in LLMs cause poisoning, distraction, confusion, and clash. Effective context management (RAG, pruning, quarantine, summarization, tool loadouts, offloading) remains essential for high-quality outputs.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest news and updates from our telecom experts