IVR Tutorial Lesson 5: Editing the Windows Batch File

As we showed in the previous sections, the recorded audio file referred here is C:\Call List\recorded_message.wav. This file is submitted to Voicent Gateway when the application is deployed.

The Deployed Audio File

The deployed IVR applications are usually installed under:
C:\Program Files\Voicent\Gateway\apps\<deployed name>

Where <deployed name> for this sample is lesson5_msg.

The deployed audio file for recorded_message.wav is usually located at:

C:\Program Files\Voicent\Gateway\apps\lesson5_msg\webapps\recorded_message.wav

Since the actual recorded file is generated dynamically, we'll need to overwrite the deployed audio file with the actual message created by the inbound IVR application. This can be easily accomplished with a Windows batch file.

The Original Batch File

This is the original runvcast.bat file under the folder C:\Call List.
REM delay for 30 seconds.
REM uses ping command as a workaround since there is no sleep command.
ping 127.0.0.1 -n 30 -w 1000 > NUL
REM now launches broadcastbyphone.
REM adds -noexit if you want to keep the program up after broadcast.
"C:\Program Files\Voicent\BroadcastByPhone\bin\vcast.exe"
"C:\Call List\mylist.voc"
-startnow -cleanstatus -wavfile %1

The %1 refers to the first argument when the batch file is invoked.

The New Batch File

The selected message for the call list has the outbound message set already. All we need to do here is rename the first argument, the recorded audio file, to the desired audio file. REM delays for 30 seconds
REM uses ping command as a workaround since there is no sleep command:
ping 127.0.0.1 -n 30 -w 1000 > NUL
REM moves and renames audio file:
move /Y "%1" "C:\Program Files\Voicent\Gateway\apps\lesson5_msg\webapps\recorded_message.wav"
REM now launches broadcastbyphone
REM adds -noexit if you want to keep the program up after broadcast
"C:\Program Files\Voicent\BroadcastByPhone\bin\vcast.exe"
"C:\Call List\mylist.voc"
-startnow -cleanstatus

The audio file no longer needs to be passed in from the command line (-wavfile %1).

This solution will not work if the connected Voicent Gateway is on a remote computer. We'll solve this problem in lesson 6.