IVR Tutorial Lesson 4: Use Variable as Program Argument

The recorded voice message is saved in an audio file. The file name of that audio file is saved in the variable message_file. This value needs to be passed to the BroadcastByPhone program in order to use the recorded message as the broadcast message.

Edit the Run Program Action

Select Message OK element, click the Properties icon on the toolbar, then choose the Action tab. Select the Run Program action in the list box, then click the "Edit" button. Click the Add button to append the following two arguments: '-wavfile' and message_file.

Please note that double quotes are added to enclose the variable message_file. This is because the file name might contain a space.

The Complete Command Line

Arguments are concatenated and passed to the program. In this example, if the recorded audio file is saved as C:\Program Files\Voicent\Gateway\work\audio.wav, then the program will be invoked as:

  • C:\ProgramFiles\Voicent\BroadcastByPhone\bin\vcast.exe
  • C:\Call List\mylist.voc
  • -startnow
  • -cleanstatus
  • -wavfile "C:\Program Files\Voicent\Gateway\work\audio.wav