IVR Tutorial Lesson 4: Create a Voice Message Variable

The recorded voice message is saved in an audio file. The file name is temporarily saved in the system variable __VG__LAST_RESULT__ right after the record. However, the value of this system variable is going to be overwritten whenever there is another caller interaction. For example, after the caller presses 1 (IVR application transitions to the Message OK element) the value of __VG__LAST_RESULT__ is set to be 1.

Once saved, the file name can then be passed to the BroadcastByPhone program as a command line argument.

Create a User Variable

A user variable is needed to save the recorded audio file name. To create a new variable, select the top element "Incoming Call", click the properties icon on the toolbar, then choose the Variable tab. Click the New button. Enter the variable name as message_file, and set the initial value to a single set of quotes:(").

Save the Recorded Audio File Name

After the voice message is recorded, the audio file name will be saved in the variable message_file. Select the Listen To Message element, click the properties icon on the toolbar, then choose the Action tab. Click the New button. From the Choose Action Type window, select Set Variable Value radio button. Enter the following information:

When element Listen to Message is active, the system variable __VG__LAST_RESULT__ contains the saved audio file name. The above assignment saves the value in the variable message_file. Since a user variable is valid for the whole IVR session, variable message_file can be used throughout our call flow diagram.