ivr IVR Tutorial Table of Content << Previous  >> Next

4.2 Create a Variable for the Voice Message

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 (Transition to 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 initial value ''.

Save the Recorded Audio File Name

After the voice message is recorded, the audio file name be saved in the variable message_file. Select 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 through out the call flow diagram.

 

ivr IVR Studio Table of Content << Previous >> Next